I think my logic is correct from my side can u plz check it
Painters problem
@ajayrajsingh_817 the way you are checking for possibility of answer is wrong, you need to check if for the current mid values is it possible to allocate the work among all the painters. So try to make a separate function for it, which will return true/false on basis of possibility.
Also don’t sort the array, it is given in the question that “any painter will only paint contiguous sections of board”, so order matters here.
sir can u check my monotonic search space is it correct or not???
monotonic search space is in tym domain s=maxboard size*time and e=sum of board size *time is it correct???
yes the search space is correct, just correct the checking condition.
sir plzz help me out in checking that condition
it gives wrong ans can u plzz check why this happens
some of the test cases didn’t pass
I have wrong the possible function with proper comments, please have a look at this, and let me know in case of any doubts https://ide.codingblocks.com/s/229718
can you plzz check my code it passes only 2 cases
@ajayrajsingh_817 The start should be maximum value from the array, since we are not sorting it taking a[n-1] will not work, take maximum from array.
rest code correct hai???