Computers and Technology

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)

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 15:30, mikey3882
When creating a budget, log fixed expenses before income. after income. after savings. at the top.
Answers: 1
image
Computers and Technology, 22.06.2019 16:30, jngonzo1226
Which of the following statements best describes it careers?
Answers: 2
image
Computers and Technology, 22.06.2019 22:00, zay179
What is a distinguishing feature of today’s graphic application software?) graphic applications are used today on a variety of devices, including touch-screen kiosks and mobile phones.
Answers: 3
image
Computers and Technology, 23.06.2019 02:30, jaueuxsn
Which component acts as a platform on which application software runs
Answers: 2
Do you know the correct answer?
In class, a queue was used in a live coding exercise to find the shortest path out of a maze, where...

Questions in other subjects:

Konu
History, 19.01.2021 09:20
Konu
Mathematics, 19.01.2021 09:20