What is wrong with this code? All sample inputs are giving correct answer but none of the test cases are getting passed.
Painter problem
@AbhilashaBansal initialize s with Max of all values of boards. Since you haven’t sorted the array you cannot take the last value of the array directly.
Assign a variable mx with 0 and then traverse loop to assign it the max value.
@AbhilashaBansal You have already initiated a thread of the same doubt earlier. I request you to kindly close that thread.