Leetcode Daily Challenge Problem With Triangles