Hi,
I need to find 2 elements in an unsorted array such that the difference between them is less than or equal to (Maximum - Minimum)/(number of elements in the array).
In O(n).
I know the max and min values.
Can anyone think of something?
Thank you!