Also, I think there is no need for sorting the number, its still okey if the 3rd person is standing 1st and has the lowest number line value. And, finding the closest 3 number takes, 3*n time.. so.. its O(n) running time.. @Dave.. good catch.. :)
-- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.