Painer's Partition - 3 test cases - wrong asnwer

Question: https://hack.codingblocks.com/app/practice/1/1057/problem

My solution: https://ide.codingblocks.com/s/414468

Coded as per the approach given in the video by Prateek bhaiyya. Code was home-work part.

Test cases - 0, 2, 4 - wrong answer
Test cases - 1, 3, 5 - correct answer

check this:

@aa1 You have provided an incorrect solution. Please read the question properly and check my code too to look for mistakes I made, and guide me accordingly.

please check it here :


the seach space is [ max time a painter takes … . . . . . . summation of all times]

the numberofPainters function is giving us minimum number of painter required to finish the work in maxlen time.
with the help of this function we are finding the minimum approriate time.