// If the cell is the ending point, we have solved the maze
if (x, y) is the ending point:
return true
// Otherwise, try to move in all four directions
for each direction in (up, down, left, right):
newX = x + direction.x
newY = y + direction.y
if newX and newY are valid coordinates and the cell is not a wall:
stack.push(newX, newY)
return false
The algorithm works by starting at the starting point of the maze and recursively exploring the maze in all four directions, marking each cell as visited as it goes. If the algorithm reaches the ending point of the maze, it returns true, indicating that the maze has been solved. If the algorithm reaches a dead end or a loop, it will backtrack and try a different direction.
Note that this pseudocode is a simple implementation of the flood fill maze solving algorithm, and there are many variations and optimizations that can be made to improve its performance and efficiency.