How we could get three numbers without ordering and then check if they form a Pythagorean triple or not?
So, pythagorean(3, 4, 5) or pythagorean(5, 3, 4) will print/return true, while pythagorean(4, 3, 6) will print/return false.
How we could get three numbers without ordering and then check if they form a Pythagorean triple or not?
So, pythagorean(3, 4, 5) or pythagorean(5, 3, 4) will print/return true, while pythagorean(4, 3, 6) will print/return false.
You can use this algotrithm :