Falling Squares

hardSolve on LeetCode