@Chinna: Your algorithm is simple quicksort with partition selection using 
medians. O(n log n) worst case. 
@Varun: You cannot prove that your algorithm will work for all cases. Hence, 
claiming a worst case bound of O(n) is incorrect.

http://stackoverflow.mobi/question177118_Algorithm-to-determine-if-array-contains-n---n-m-.aspx

--
DK

http://twitter.com/divyekapoor
http://www.divye.in

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/rRP-R-G2MM4J.
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.

Reply via email to