Can someone tell my mistake

not able to pass test cases and also not able to detect error

hi @chirag.goel360
your logic is absolutely correct
one thing you have forgot is sorting the array
to use binary search array should be sorted

array is already sorted as mentioned in question

okay

the min page that student has to read is last element of array not first
so s=arr[n-1];
this is only mistake
i have check now it is passing all testcase

thank you for help sir

1 Like