Aggressive cows problem

sir in spoj input array is not given in sorted order

hello @raghavthecoder
u can sort them . and then apply ur binary search logic.

ok sir can we do it without sorting as sorting will also take some time

yeah sorting will take some time but we cannot apply binary search without sorting .

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.