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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 07:30, ghopk5929
In the film "epic 2015," epic is the name for:
Answers: 3
image
Computers and Technology, 22.06.2019 12:40, dkjfghdjk
In a response of approximately 50 words, explain why it would be essential for the successful a/v technician to participate in additional coursework, presentations and seminars offered by equipment manufacturers as well as annual conferences attended by colleagues in the industry.
Answers: 1
image
Computers and Technology, 22.06.2019 17:20, Korkot7633
[a] create a class called “cycle” which has two instance integer variables as properties, “numberofwheels” and “weight.” create a constructor with two parameters, using the same variable names in the parameter list. assign each variable to numberofwheels” and “weight” respectively. write a separate application to test the class and display its properties. note: do not change the names of the instance variables or the variables listed in the constructor’s parameter list. [b] edit your class cycle by adding a default constructor which will assign the default values of 100 to represent the numberofwheels, and 1000 to represent the weight, by invoking a call to the other constructor. modify your application created in [a] to test the class.
Answers: 3
image
Computers and Technology, 23.06.2019 03:00, tay9122
Jason, samantha, ravi, sheila, and ankit are preparing for an upcoming marathon. each day of the week, they run a certain number of miles and write them into a notebook. at the end of the week, they would like to know the number of miles run each day, the total miles for the week, and average miles run each day. write a program to them analyze their data. your program must contain parallel arrays: an array to store the names of the runners and a two-dimensional array of five rows and seven columns to store the number of miles run by each runner each day. furthermore, your program must contain at least the following functions: a function to read and store the runners’ names and the numbers of miles run each day; a function to find the total miles run by each runner and the average number of miles run each day; and a function to output the results. (you may assume that the input data is stored in a file and each line of data is in the following form: runnername milesday1 milesday2 milesday3 milesday4 milesday5 milesday6 milesday7.)
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 in other subjects:

Konu
Biology, 04.09.2020 02:01
Konu
Mathematics, 04.09.2020 02:01