Paratha (spoj) binary search


why my code is not returning anything ? please check once the code.

@nirupama1 first of all your given input is not matching with the format in which you have coded the input, so first correct it.

@nirupama1
also your can_make_pratha function is not correct, time is gonna increase like 1a[i], then 2a[i], 3*a[i],…
but you have just added a[i].
try to resolve this.
If face any difficulty in implementing this then feel free to ask.

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.

1 Like