Painter's partition problem in hackerblocks


{I think this problem testcases are wrng. can u please check the code and output’s from it with the original output?please}