Leetcode 633. Sum of Square Numbers
Determine whether a non-negative integer c can be expressed as a^2 + b^2 for integers a and b. With c up to 2^31ā1, the typical approach is O(sqrt(c)) ā e.g., iterate a up to sqrt(c) and check whether cāa^2 is a perfect square (or use a two-pointer search).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Your account is free and you can post anonymously if you choose.