Class DepthFirstSearch

java.lang.Object
mazealgo.model.algorithms.search.ASearchingAlgorithm
mazealgo.model.algorithms.search.DepthFirstSearch
All Implemented Interfaces:
ISearchingAlgorithm

public class DepthFirstSearch extends ASearchingAlgorithm
Depth First Search. Uses an explicit LIFO stack instead of recursion so it can handle large mazes (e.g. 1000x1000) without blowing the call stack. The path it finds is some path to the goal, not necessarily the shortest.
  • Constructor Details

    • DepthFirstSearch

      public DepthFirstSearch()
  • Method Details