Skip to main content

Traverse ↔ (process) to move across Graph & select Nodes

References

  1. BFSSearch Algo to Traverse breadth first, down Graph child layer by child layer

  2. DFSSearch Algo to Traverse depth first down Graph entire child subtree & backtrack

  3. Fibonacci Recursive ↔ assume sequence starts with 1. Example of BAD Recursive fn. Traverse down Fibonacci Tree until reach 1

function fibonacci(index: number) { 
if(index <= 1) return 1
return fibonacci(index-1) + fibonacci(index-2)
}