Binary search..not a good approach


#1

i have done it in 0(n) approach.