If you need hint:
I used DP (Dynamic Programming) to solve this and get AC (Accepted). I 
stored the matrix as 2-D array and then started with array[R][C]. From 
there I can go upward and left. In each element of array put the minimum 
possible value to get the array[R][C]. In case, if we get the value <= 0 
substitute it by 1 because values <=0 are not allowed. Follow this 
procedure up to array[1][1] which is your final answer. I don't know what's 
wrong with your approach as I don't have enough time to examine it.
Here is my solution: http://pastebin.com/Cwah24Xi

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/9t6zsIUpYWYJ.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to