why is it failing at some testcase? please tell me what is wrong with my logic.
Painter problem
hello @nirupama1
u r not initialising ur s variable correctly.
it should be s=max_element in array X time . and because array is not sorted ,len[n-1] need not to be maximum all the time.
1 Like