Please provide corner case

what could be a corner case for this problem?

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

https://ide.codingblocks.com/s/265548 please check still 2 tests are not working

image
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