Skills101
← All practice quizzes

Quiz: Rooted Trees and Huffman Coding

5 questions · new set on every retakeNo time limitPass: 60%+10 XP on first pass

Rooted trees in discrete maths: the vocabulary, the counting formulas for full m-ary trees (with the knockout-tournament trick), prefix codes and why they decode without confusion, and Huffman's algorithm for the shortest prefix code — built and checked in Python.

Log in to take the quiz

Free account · see your score, answers and explanations, earn XP

  1. Question 1

    In a rooted tree, what is a leaf?

  2. Question 2

    A full binary tree has 20 internal vertices. How many leaves does it have?

  3. Question 3

    A full ternary tree has 10 internal vertices. How many vertices does it have in total?

  4. Question 4

    A knockout chess tournament has 32 players. How many games are played (no draws)?

  5. Question 5

    What is the minimum height of a binary tree with 100 leaves?

🎯 Today’s placement challenge — 10 questions, no login. Can you score 10/10?Take today’s challenge →