Painter problem


what is wrong in this code it is not passing last two test cases?

Hey @shubhangis248 I have removed your this if statement


Try submitting after removing it and let me know if it works or not.

Also I guess you haven’t done anything to calculate minimum time
Use this code for reference


It will give you successful submission.