Grid Game Algorithm

Posted by 7Aces on Programmers See other posts from Programmers or by 7Aces
Published on 2012-11-06T17:44:43Z Indexed on 2012/11/06 23:18 UTC
Read the original article Hit count: 209

Problem Link - http://www.iarcs.org.in/inoi/2009/zco2009/zco2009-1a.php

You have to find the path with the maximum weight, from the top-left cell to the bottom-right cell. It could've been solved with a simple Dynamic Programming approach, if it were not for the special condition - you are allowed at most one move that can be either to the left or up. How do I now approach the problem with this special case?

Also, I'm looking for a time-efficient approach.

Thanks!

© Programmers or respective owner

Related posts about algorithms

Related posts about dynamic-programming