please explain the question and the sample input also
Painter problem
Hi jatin
In the question u have given the number of painters and the n board with it’s length
Now u have to paint like that the time will be minimum and 1 painter have to paint the given board fully
Now the
Example
Let painter be 2
And board
1 10 5
Now u can assign 1 painter to 1st board and 1 to 2ñd board
Now the 2nd board take 10 second and in this first painter can paint both 1 and 3 board so ans is 10
Hint it is a binary search type question
1 Like