Not able to figure out my mistake . Kindly help with tiling problem 2.
Kindly help getting WA (Wrong answer )
no,u should again initialise it inside while loop.
yes , it worked . But why ? isnt {0} the same as initializing . Thx for the help
that will intialise only once after each iteration ur dp array will contain some values (non zero) which are of no use for new testcase.therefore again intialising it with 0.
1 Like