End in the binary(eko-spoj problem)

how do i initialize the end of the binary search implementation in this problem.
i have taken the start=0, but confused about end.

End will be the sum of each element in array a

how can you explain it once

can’t i take the end as highest element in the array

Yes you can also do it by picking the biggest element in the array by sorting it first.

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.