tags:
- lecture
- mit
- ocw
- algorithms
- data-structures
- binary-tree
- notes
source: https://ocw.mit.edu/courses/6-006-introduction-to-algorithms-spring-2020/376714cc85c6c784d90eec9c575ec027_MIT6_006S20_lec6.pdf
created: 2024-10-14
published:
...
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.
...
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:
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
...