โ† OYO questions

Pythagorean triplets in an array

Filed under OYO

Find all Pythagorean triplets (a, b, c) in an unsorted array such that a^2 + b^2 = c^2. The solution must run in O(n^2) time without sorting the array.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related OYO questions

Collected from public candidate posts and coding forums. Updated Nov 2026.