use hash map.....O(n)
or you can use use the binary search for each element
O(nlogn) ........

Regards
Aviral
http://coders-stop.blogspot.com

On Dec 22, 3:05 pm, snehal jain <[email protected]> wrote:
> How will you find the pair from an sorted array whose difference is x

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to