There's something wrong with my code

@prateek_5 what your check function should do is keep doing sum of boards and check if sum > mid then increment the count of painters required.
So during the sum if the number of painters required are greater than the k, then return false otherwise return true at the end.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.