Pythagorean Triples

Statement

Given an integer array, find all Pythagorean triples (a2a^2 + b2b^2 = c2c^2), where aa, bb and cc are the array elements.

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.