A complete binary tree with n leaf nodes can have ______ nodes of degree 2.…
2017
A complete binary tree with n leaf nodes can have ______ nodes of degree 2. ----------------------------------------
- A.
log2n
- B.
n-1
- C.
n
- D.
2n
Attempted by 765 students.
Show answer & explanation
Correct answer: B
Correct Answer: n-1 Explanation: In a complete binary tree, the number of internal nodes (nodes of degree 2) is always one less than the number of leaf nodes, hence n leaf nodes imply n−1 internal nodes. ----------------------------------------