Available question text
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).
Related questions
Continue with questions that share topics or the same question type.
- Consecutive Numbers Sum
Coding · Enumeration · Math
- Count Square Sum Triples
Coding
- Find the Minimum Number of Fibonacci Numbers Whose Sum Is K
Coding
- Maximum Side Length of a Square with Sum Less than or Equal to Threshold
Coding
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 633. Sum of Square Numbers
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source