DSA 38: Binary Search Trees - Basics [Part 1]

Trees & Binary Trees: Useful Terms
data structures
algorithms
Author

Tony Phung

Published

February 21, 2025

1. Tree

1.1 Linked List vs Tree: Node-Based Structures

  • They’re both node-base structures but are have their differences.

1.2 Classic linked list

  • Each node contains a link connecting to a single other node.

1.3 Tree

  • Each node can have s to multiples nodes

1.4 Root of the Tree

  • Is the top node of the tree
  • Parent node of all nodes
  • It is ascendents of all sub-sequent connected nodes (children)

1.5 Descendents

  • Are nodes one or more level down from a parent node
  • Children are nodes exactly one level down from any parente node

1.6 Balanced Tree

  • Trees in which all sub-trees contain the same amount of nodes (children)
  • Imbalanaced if vice-versa

2. Binary Tree

  • Has zero,
  • One or
  • Two children

2.1 Binary Tree Types