Have students implement an algorithm in Java to solve mazes so they can practice manipulating 2D arrays, stacks, and queues.

  • When working with algorithms to solve a maze (represented as a 2D array), students use stacks and queues to keep track of where they’ve been and where they have yet to explore.
    • This provides a good opportunity to introduce depth-first and breadth-first search.
  • Students also learn how to manage and maintain several interacting objects and classes.
  • For the full assignment, visit Stanford’s nifty assignment page.

More about this tip