i used the same approach in as in book allocation problem.
Painter problem- code seems to be correct.but test cases are failed
Try to take the value of s in your code to be maximum(ar,N), and then try to submit the code.
i used the same approach in as in book allocation problem.
Try to take the value of s in your code to be maximum(ar,N), and then try to submit the code.