Array Partition Leetcode Solution 125