My interest was sparked by this Quora question:
How would you find all the Pythagorean triplets in an array of N numbers? The first answer was the straightforward O(N^2) examination of all pairs of numbers. It seemed like there might be a better way. One of the comments initially suggested O(N^2) was probably the best possible, because of its
(
Read more... )
Comments 3
Is that useful in limiting the search space?
Reply
I did not see any way to apply it to the search in a more direct fashion.
Reply
Reply
Leave a comment