what could be a corner case for this problem?
Please provide corner case
hello @Manvik-Arya-4391661007540658
no corner case.
simple binary search.
if ur code is not passing test cases then pls save ur code here https://ide.codingblocks.com/
and share the link with me
kindly check my code
a) dont sort the array , because painter are allowed to paint only contiguous blocks
b) search space-> s = max in array
e= summation of array
![]()
use mod here as well
thanks it is working but can you tell me why did we use mod 2 times?
it is mod property.
(a*b)%mod is same as (a%mod * b%mod )%mod