Graphs

What is a graph?

  • Abstract data type
  • Nodes and vertexes
  • Types
  • Examples

What is a tree?

  • Special type of a graph
  • Acyclic connected graph
  • Root and leaves
  • Examples

Common algorithms

  • Breadth-first Search
    • Queue
  • Depth-first Search
    • Stack
  • What else do you know?

Recursion

"To understand recursion you need to first understand recursion"

Recursive

Iterative

# Tail recursion

Tree recursion

Split the problem into smaller problems

fibonacci(n) = fibonacci(n - 1) + fibonacci(n - 2)

Higher-order functions

Functions that accept another functions as an argument

Graphs

By Hack Bulgaria

Graphs

  • 1,353