Sir , told that we are not doing binary_search on actual array …we are doing on. from
s=0; ot
e=stall[n-1]-stall[0];
kindly explain thats…
and i followed sirs approached but test cases are not passing…
kindly correct my code…
regards
Sir , told that we are not doing binary_search on actual array …we are doing on. from
s=0; ot
e=stall[n-1]-stall[0];
kindly explain thats…
and i followed sirs approached but test cases are not passing…
kindly correct my code…
regards
so can you think of the way to place two cows at minimum distance. placing two cows at minimum distance means you have to place them adjacently and placing two at maximum distance means you have to place it at first and last. so now your answer will range between these maximum and minimum value.
you can see this code to understand this better
thanks.
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.