We will be creating rectangular mazes in this exercise. You are to write the createMaze function with
the signature list<Wall> & createMaze ( int r , int c , PQueue<Wall> & pq ). Here r designates the number
of rows, c the number of columns and pq the priority queue containing walls. The function is to appear
within the [url removed, login to view] file. The function returns a list of walls to be demolished. Your createMaze
function must select the highest demolishion priority walls to be demolished. However if too many walls
are demolished, the puzzle will be too easy to solve. Our goal is to remove just enough walls so each
room can be reached from any other in exactly one way. The createMaze function is to select the walls
for demolition; we must select r Ã— c âˆ’ 1 such walls. Try counting the removed walls in figure 1; 69 walls
are missing. Walls are obtained from the priority queue according to their demolition priorities.
However, we must never remove a wall between two rooms if there is already a path between them. If
a path between two rooms already exists, the wall is not considered any further. The selection process
continues until enough walls are destroyed. Your disjoint subset methods will be useful in determining
whether two rooms are currently connected.
3 freelance font une offre moyenne de $220 pour ce travail
I'm an experienced c++ programmer and i can do this programming exercise for you from now. Regards