subject

In class, a queue was used in a live coding exercise to find the shortest path out of a maze, where a single move was moving up (subtracting 1 from the row), moving left (subtracting 1 from the column), moving right (adding 1 to the column) or moving down (adding 1 to the row). The queue stored integers, which represented row-column coordinates into the maze, which was represented as a two dimensional character array. The characters in the array were as follows: 'S : starting location
'x' : illegal location
'-' : valid location to travel to
'~' : maze border
Given the following input maze (6 rows, 8 columns), determine the first 12 integers enqueued into the queue, and ALSO state which 0-based row, column coordinates those integers represent. Note that there are different correct answers to this question, but all correct answers have the same set of integers/ordered pairs, just in slightly different orders. In order to receive full credit, you must provide your list in one of the valid orderings.
68 XX- ---S-X ---XX--
Please present your answer in the following format:
1. Value 18, Location (4,2), row 4, column 2
2. Value 19, Location (4,3)
3. ... 12. Value 9, Location (2, 1)

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 19:10
Select the correct answer. emma, the quality control manager in a software development company, asks the testing team to check whether the user interface is friendly. to which type of testing is emma referring? a. usability testing b. data comparison c. validation testing d. stress testing e. destruction testing
Answers: 1
question
Computers and Technology, 25.06.2019 08:00
A( the heart of an information system, is a collection of all relevant facts organized in a series of integrated files.
Answers: 1
question
Computers and Technology, 25.06.2019 08:30
Which of these devices is usually the default for most home network?
Answers: 1
question
Computers and Technology, 25.06.2019 10:50
Which of the following is true of heuristics? a)heuristics always lead to correct solutions of a problem. b)heuristics represent commonly used approaches to the solution of a problem.c) heuristics are a slower way to solve problems than are other strategies. d)heuristics are used by computers but not by humans as problem-solving tools.
Answers: 3
You know the right answer?
In class, a queue was used in a live coding exercise to find the shortest path out of a maze, where...
Questions
question
Mathematics, 05.06.2020 00:04
Questions on the website: 13722361