Free written solution

Count Square Sum Triples (LeetCode 1925): Solution and Explanation

Count the ordered triples (a, b, c) with a² + b² = c² and every value between 1 and n.

Read the intuition, approach, code and complexity →