David's Guide to CS

Trees

Jump to Section
  • set of nodes
  • first node is root
  • every other node has a “parent” node

Two Trees

  • Every node that is not a leaf has 2 child nodes

Binary Trees

  • Every node has a maximum of 2 children