|
|
back to boardHelp pls Posted by Madhav 15 Jul 2008 08:51 Can any one tell me how to solve this problem using greedy approach pls..? Re: Help pls Initially values till max=0 are reachable. If next coin is higher than max+1, then the answer is max+1. Otherwise max is boosted by its value (that is, values 0...max+ai are reachable). Proceed until you find a hole or you run out of coins. |
|
|