← All topics
Quiz: Rooted Trees and Huffman Coding: questions with answers
10 questions, each with the answer and a short explanation.
Take the timed quiz + get a certificate →- Q1. In a rooted tree, what is a leaf?
- Q2. A full binary tree has 20 internal vertices. How many leaves does it have?
- Q3. A full ternary tree has 10 internal vertices. How many vertices does it have in total?
- Q4. A knockout chess tournament has 32 players. How many games are played (no draws)?
- Q5. What is the minimum height of a binary tree with 100 leaves?
- Q6. Which of these codes is a prefix code?
- Q7. What does this print? (code)
- Q8. In Huffman's algorithm, which two trees are merged at each step?
- Q9. Frequencies are p:4, q:2, r:1, s:1. What is the total number of bits in the Huffman encoding?
- Q10. What does this print? (code)