I have tried the SUMTRAIN problem, as suggested in the comments below the problem, i have to add the largest integer per row irrespective or their position . so tried this : https://ideone.com/gsz60r
But it give Wrong Answers. Any suggestion what will be causing WA in this?
your approach will give wrong answer because we cant move from top to bottom directly jumping to the largest integer row by row.
* we need to follow the given rules.
* the member at position (i,j) can move to (i+1,j) or (i+1,j+1)
* we can use recursion with memoization here to solve with in time limit.
* try this method… my soln. is http://ideone.com/zXuDch