The best algorithm to find two numbers in array which their difference is delta.
Anonymous
I sorted it with count sort and then n times took number decreased it and did binary search to find his partner.
Check out your Company Bowl for anonymous work chats.