subject

In java, create programe that find shortest steps to reach maximum gold (only right and down move) and print path. start from [0][0] in the top conner while avoiding steps the 'T' trap. Hint: using brute force search and dynamic programing
So here is the char[][] Mapp

Input is 2d array matrix:

char[][] MapGnomes = {
{'.', 'T', '.', '.', 'T', },
{'.', '1', '3', '.', '.', },
{'2', 'T', '.', '4', 'T', },
{'.', '.', '3', '.', '6', },
{'4', '.', '.', '.', 'T', },
{'4', 'T', '4', '3', '2', },
{'3', 'T', '.', '.', 'T', },
};

And output:

maximum gold is: 16.

Steps to reach maximum gold is: 10.

Path to reach maximum gold is: DDR.

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 18:30, oceanbrezze85
Ayear in the modern gregorian calendar consists of 365 days. in reality, the earth takes longer to rotate around the sun. to account for the difference in time, every 4 years, a leap year takes place. a leap year is when a year has 366 days: an extra day, february 29th. the requirements for a given year to be a leap year are: the year must be divisible by 4if the year is a century year (1700, 1800, the year must be evenly divisible by 400some example leap years are 1600, 1712, and 2016.write a program that takes in a year and determines whether that year is a leap year. ex: if the input is 1712, the output is: 1712 is a leap year. ex: if the input is 1913, the output is: 1913 is not a leap year.
Answers: 2
image
Computers and Technology, 22.06.2019 10:00, kimmmmmmy333
According to alisa miller foreign news bureaus
Answers: 3
image
Computers and Technology, 23.06.2019 04:31, Remba
Q14 what is most important for you to choose before you build a network? a. private network b. nos c. network media d. network protocol e. directory service
Answers: 1
image
Computers and Technology, 23.06.2019 17:20, Morehollie9428
What is the best assassins creed game?
Answers: 2
You know the right answer?
In java, create programe that find shortest steps to reach maximum gold (only right and down move) a...

Questions in other subjects:

Konu
Law, 09.11.2020 03:50
Konu
Mathematics, 09.11.2020 04:00