Chapter 21 Flashcards
binary tree
A tree in which each node refers to zero, one, or two dependent nodes.
root
The topmost node in a tree, with no parent.
leaf
A bottom-most node in a tree, with no children.
parent
The node that refers to a given node.
child
One of the nodes referred to by a node.
siblings
Nodes that share a common parent.
level
The set of nodes equidistant from the root.
binary operator
An operator that takes two operands.
subexpression
An expression in parentheses that acts as a single operand in a larger expression.
preorder
A way to traverse a tree, visiting each node before its children.
prefix notation
A way of writing a mathematical expression with each operator appearing before its operands.
postorder
A way to traverse a tree, visiting the children of each node before the node itself.
inorder
A way to traverse a tree, visiting the left subtree, then the root, and then the right subtree.