Question: Mining for gold Lets say we are making a gold collector game. The game has a map M that is a twodimensional N M grid.
Mining for gold
Lets say we are making a gold collector game. The game has a map M that is a twodimensional N M grid. Each coordinate has a certain amount of gold. We would use Gold[i][j] to represent the amount of gold at coordinate(i, j). A player starts from coordinate M[0][0] which is the lower left corner. At each step, the player can either go up or right by one coordinate. The game ends once the player cant move up or right. The goal of this game is to collect as much gold as possible at the end of game. We want to show the player the maximum amount of gold that can be actually collected when the game ends. Describe an algorithm to calculate the maximum amount of gold that can be collected and analyze its complexity.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
