Doubt with the value of low

I dont understand why we can take the value of low as max(array)?

Hi @prajwalbakshi, min(array) has been taken because there will be a testcase for which answer can lie between min(array) & max(array). If we use max(array) then that case will never be checked and hence our answer can be wrong.

Hope this helps :slight_smile:

Actually the answer always lies between max(array) and sum(array). Thanks though I got the answer.