Get Minimum Squares Leetcode Javascript Problems Solving