A binary tree is a different kind of data structure that demands new terminology and algorithms. A binary tree node will have two pointers available for linking with other nodes, resulting in diagrams that look like inverted trees. A binary tree will begin with one node at the top and branch out below. As you might expect, the potential of going one of two different ways leads to some challenging programming problems. In fact, the idea of trying one direction and then backtracking naturally leads to recursion.
The key topics for this lesson are:
- Binary Tree Vocabulary
- Building a Binary Tree
- Shape of a Binary Tree
Inorder Tree Traversal
- Preorder and Postorder Tree Traversals
- Counting the Nodes in a Tree
- Searching a Binary Tree
- Deletion from a Binary Tree
deleteTargetNode Method
|