CS 371: Module 17: Introduction To Binary Trees
Module content developed by Professor Tralie. Module engine developed by Professor Tralie and Professor Mongan.
Below is a video from CS 174. Please watch the first 7 minutes until it gets to the C++ code, and then you can skip to the next page
Notes
- A binary tree is a generalization where every node has both a
leftand arightreference to other nodes, known as the left and right child nodes, respectively. - Binary trees are drawn from top to bottom by convention. The top node where a binary tree starts is called the
rootnode - If a node
cis the child of a nodep, thenpis referred to asc's parent. - Binary trees are naturally recursive data structure, as an entire subtree can be spliced in by making the left child of a node be the root of that subtree.