COURSE: DATA STRUCTURES & ALGORITHMS
SECTION 06 // BINARY SEARCH TREES
C++ DATA STRUCTURES•SPRING
BST.CPPFULL PROGRAM · WORD BY WORD←→ word ↑↓ line
— press → to type the first word — swipe left to type the first word
Code Trace

Binary Search Trees

Type the whole program word by word. The node, the traversals and the tree grow beside the code — and the console prints when main reaches it.

  1. 01Struct
  2. 02Pre-order
  3. 03In-order
  4. 04Post-order
  5. 05Node count
  6. 06Insert
  7. 07Search
  8. 08Main
  9. 09Output
→start typing←delete↑↓lineCtrlSsectionsSwipe ← → to type and delete, or use the buttons below

Hagar Gamal

Faculty of Computers & Information