Click here to Skip to main content
16,011,383 members

Comments by gopesh2010 (Top 2 by date)

gopesh2010 29-Sep-14 1:40am View    
First of all if max is equal to min it will always go to infinite loop, secondly before going inside your loop you can check that the value you are going to search is at location min or max, that will save the overhead of a loop.
gopesh2010 21-Aug-12 5:01am View    
Nice solution...