Monotonic search space

how the mid point become 8

which timestamp @Ravi-Kant-1580620005429648?

what i understand after dry run
from 0to50 s=0and e=50 mid=(s+e)/2=25 and 2525>50 in this case e=mid -1
now we have to search from s=0 ,e=24 again mid =12 and 12
12> 50 again e=mid -1
now we have to search from s=0 ,e=11again mid =5and 55<=50 again s=mid +1;
now we have to search from s=6 ,e=11again mid =8 and 8
8>50 again e=mid -1;
now we have to search from s=6 ,e=7again mid =6and 66<=50 again s=mid +1;
now we have to search from s=6 ,e=7again mid =7 and 7
7<=50
ans we get ans as=7
but in video it is as mid point is taken as 25 12 6 8
is this my dry run is right??

@Ravi-Kant-1580620005429648 sir is just explained he just took the middle didn’t calculate it properly but if done properly
yours is absolutely correct
(just at last step of yours s and e both will be 7 i think you mis typed

yes i just mis typed

@Ravi-Kant-1580620005429648 oh ok np if cleared just mark resolved :smiley:

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.