Chapter 8 Flashcards
Tree
A structure with a unique starting node (the root), in which each node is capable of having multiple child nodes, and in which a unique path exists from the root to every other node
Root
The top node of a tree structure; a node with no parent
Binary tree
A tree in which each node is capable of having two child nodes: a left child node and a right child node
Leaf
A tree node that has no children
Descendant
A child of a node, or a child of a parent
Ancestor
A parent of a node, or a parent of an ancestor
Binary search tree
A binary tree in which the value in any node is greater than or equal to the value in its left child and any of its descendants (the nodes in the left subtree) and less than the value in its right child and any of its descendants (the nodes in the right subtree)
Preorder traversal
A systematic way of visiting all the nodes in a binary tree by visiting a node, then visiting the nodes in the left subtree of the node, and then visiting the nodes in the right subtree of the node
Inorder traversal
A systematic way of visiting all the nodes in a binary tree by visiting the nodes in the left subtree of a node, then visiting the node, and then visiting the nodes in the right subtree of the node
Postorder traversal
A systematic way of visiting all the nodes in a binary tree by visiting the nodes in the left subtree of a node, then visiting the nodes in the right subtree of the node, and then visiting the node
Full binary tree
A binary tree in which all of the leaves are on the same level and every nonleaf node has two children
Complete binary tree
A binary tree that is either full or full through the next-to-last level, with the leaves on the last level as far to the left as possible
A structure with a unique starting node (the root), in which each node is capable of having multiple child nodes, and in which a unique path exists from the root to every other node
Tree
The top node of a tree structure; a node with no parent
Root
A tree in which each node is capable of having two child nodes: a left child node and a right child node
Binary tree