Question: Consider a computer game with a 2D map with axes(1, 2,..., )and(1, 2,..., ).The goal is to start from11, move step by step to arrive
Consider a computer game with a 2D map with axes(1, 2,..., )and(1, 2,..., ).The goal is to start from11, move step by step to arrive at, and reach the highest possible score.At each coordinate the player arrives, they gain a (positive) number of game points. Additionally, thereis a rule that restricts the movements. If the player is at, their next move should be either+1or+1, and no other movement is possible. Design a brute-force algorithm to find the sequence of steps to reach the maximum number of total points.
Example: Input: n=4,m=3 Game map: Output: Route: A1B1A2B1A2B2A3B2A3B3A4B3 Points: 25+45+15+88+15+23=211
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
