Exercise: Recursive Recursive Backtracker
Test yourself by implementing the Recursive Backtracker algorithm using an implicit stack with actual recursion.
We'll cover the following
Problem statement
There's nothing wrong with using an explicit stack, but let's see how much more concisely the Recursive Backtracker algorithm can be implemented if we use an implicit stack with recursive function calls.
Coding challenge
Using any or all of the code we've written so far, create a modified version of the Recursive Backtracker algorithm that uses recursive function calls to generate the maze.
Once finished, compare the two implementations. Which one do you prefer? Which one runs faster? Which one uses less memory? Is there a limit to the size of the mazes that could be generated via recursive function calls?
Write your solution code for the modified version of the recursive Recursive Backtracker algorithm here:
Get hands-on with 1400+ tech skills courses.