Right Triangles Leetcode Javascript Questions Basic