Binary Trees/Cheat Sheet
From charlesreid1
Important Facts
For any binary tree, number of internal nodes and number of external nodes are related as:
E = I + 1
Scaling Complexity
Tree implementations can be made very complicated, or very simple.
Complications:
- Interfaces, abstract classes, virtual methods
- Positions abstracted from nodes, array/linked either (flexible)
- Pre/post-method hooks
- Trees vs. binary trees
- Sorted vs. unsorted
- Bifurcations of methods that are needed, utility and modification
Flags
Trees Part of Computer Science Notes
Series on Data Structures Abstract data type: Trees/ADT Concrete implementations: Trees/LinkedTree · Trees/ArrayTree · SimpleTree
Tree Traversal Preorder traversal: Trees/Preorder Postorder traversal: Trees/Postorder In-Order traversal: Binary Trees/Inorder Breadth-First Search: BFS Breadth-First Traversal: BFT Depth-First Search: DFS Depth-First Traversal: DFT OOP Principles for Traversal: Tree Traversal/OOP · Tree Traversal/Traversal Method Template Tree operations: Trees/Operations Performance · Trees/Removal
Tree Applications Finding Minimum in Log N Time: Tree/LogN Min Search
Abstract data type: Binary Trees/ADT Concrete implementations: Binary Trees/LinkedBinTree · Binary Trees/ArrayBinTree Binary Trees/Cheat Sheet · Binary Trees/OOP · Binary Trees/Implementation Notes
|