Get Minimum Squares Leetcode Javascript Interview