May you please rectify my code, its showning wrong answer in some test case


this code is passing 2 test case out of 4 . do you please check wheater my approach is wrong or i dont get the question completely.

Use binary search to find the min no of painters required to paint the board.

i think question asked for the time required by 1 painter to paint the board. is i got it wrong???

Oh yes , its min time required to paint the board by given painters.