Convert An Array into a 2D Array with Conditions Leetcode 2610

Published --