Class 15 - Alwynblake/seattle-javascript-401n12 GitHub Wiki
Trees
-
Binary Tree: Binary Trees are trees that only contain no more than 2 children. There is not a specific sorting order for a binary tree. Nodes can be added into a binary tree wherever space allows.
-
Search Tree: A binary search tree is a type of tree that does have structure attached to it. In a binary search tree, the tree is organized in a manner where all values that are smaller than the root are placed to the left, and all values that are larger than the root are placed to the right.
- Node - a node is the individual item/data that make up the data structure.
- Root - The root is the first/top Node in a tree
- Left Child - The node that is positioned to the left of the root
- Right Child - The node that is positioned to the right of the root
- Edge - The edge in a tree is the link between two nodes
- Leaf - A leaf is the node that does not contain either a left child or a right child node.
- Height - The height of a tree is determined by the number of edges from the root to the bottommost node.