Find all Pythagorean triplets in an array of real numbers.
e.g: 2,3,4,5,6
output:
3,4,5
Does any know any solution to this problem with time complexity < O(n^3) ??
Using some balanced tree you can cut it down to O(n^2 log n)
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks