How? Binary Trees!

...

What is a binary tree based on?
A binary tree is based on pointers.

How many pointers are there per node?
There are 3 pointers per node.

...

Terminology

What is the root of a binary tree?
The root of a binary tree is the node which has no parent.

What is a leaf of a binary tree?
A leaf of a binary tree is a node with no children.

How do you find the depth of a given node?
To find the depth of a given node, count the number of nodes on a path from the root to the given node.

How do you find the height of a node?
To find the height of a node, find the maximum depth of any node in the subtree rooted at that node.

What inherent order does a binary tree have?
The inherent order that a binary tree has is traversal order.

The left child of a node is ... than the parent.
The left child of a node is less than the parent.

The right child of a node is ... than the parent.
The right child of a node is greater than the parent.

What are the three steps for listing nodes in traversal order with a recursive algorithm starting at the root?
The three steps for listing nodes in traversal order with a recursive algorithm starting at the root is:

  1. Recursively list the left subtree.
  2. List self (the root).
  3. Recursively list the right subtree.

What is the runtime for listing nodes in traversal order with a recursive algorithm starting at the root?
The runtime for listing nodes in traversal order with a recursive algorithm starting at the root is since work is done to list each node.

Tree Navigation

...