Solve the triangle sum problem for leetcode.