Medium · Math & Number Theory · about 15 minutes
Asked at LinkedIn, Google, Amazon, Bloomberg, Meta.
Given a non-negative integer c, return true if there are integers a and b with a² + b² = c.
c
a
b
a² + b² = c