Patching Array Leetcode Solution 1950s