Exam weight Low
Exam weight Low
Exam weight
High
- Root, internal and external (leaf) nodes, ancestors, descendants, depth (from root), height (max depth), subtree.
🎯 How this can come up · 1 question
MCQ
The height of a tree is:
Correct: The maximum depth of any node.
Exam weight Low
Exam weight Low
Exam weight Low
- Preorder: node, then children. Postorder: children, then node.
Exam weight Low
Exam weight Low
Exam weight Low
- Binary tree: each node has at most two children (left, right). Proper: 0 or 2 children.
Exam weight Low
Exam weight Low
Exam weight Low
Exam weight Low
Exam weight
High
- Proper binary tree: e = i + 1 (leaves = internal + 1); h ≤ i; e ≤ 2ʰ.
🎯 How this can come up · 1 question
MCQ
A proper binary tree with 7 internal nodes has how many leaves?
e = i + 1.
Exam weight Low
Exam weight
High
- Inorder: left, node, right.
🎯 How this can come up · 1 question
MCQ
Inorder traversal of a BST gives the keys:
Correct: In sorted order.
Exam weight Low
- Print an arithmetic expression: inorder with parentheses. Evaluate it: postorder.
Exam weight Low
Exam weight Low
- Euler tour: visit each node on the left, from below, and on the right (generalizes all three).
Exam weight Low
Exam weight Low
Exam weight Low
Exam weight
High
- Array representation: root at 1 (or 0); children of node i at 2i and 2i + 1 (with root at 1).
🎯 How this can come up · 1 question
MCQ
With the root at index 1, the children of node i are at:
Correct: 2i and 2i + 1.
Exam weight Low
Exam weight Low
No slides match this filter.