Question: 2. Write a C++ function named pathExists that determines whether or not a there's a path from start to finish in a rectangular maze. Here



2. Write a C++ function named pathExists that determines whether or not a there's a path from start to finish in a rectangular maze. Here is the prototype: bool pathExists (string maze[l, int nRows, int nCols, int sr, int sc, int er, int ec) // Return true if there is a path from (sr,sc) to (er,ec) /7 through the maze; return false otherwise The parameters are: A rectangular maze of Xs and dots that represents the maze. Each string of the array is a row of the maze. Each 'X represents a wall, each ' represents a bottomless trap hole, and each .' represents a walkway. The number of rows in the maze
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
