Recursive Depth-First Search

A recursive depth-first search algorithm that explores branches deeply before backtracking, managing traversal state with recursion.

  • Time complexity of insertion and deletion is Constant, i.e. O(1)
  • Time complexity of search is is Linear, i.e. O(n)
  • Space complexity is Linear, i.e. O(n)