Practice mode Data Structures

A full binary tree, in which every node has either 0 or 2 children, has 10 internal nodes. How many leaves does it have?

Correct answer B. 11

Explanation

In a full binary tree the number of leaves is always one more than the number of internal nodes, L = I + 1. Each internal node contributes two child edges, so there are 2I edges, and since edges equal nodes minus one, 2I = I + L − 1, giving L = I + 1. With 10 internal nodes there are 11 leaves and 21 nodes in total.

Report a problem

Answer checked How we write and check questions

Tip: press A, B, C or D to answer, and N for the next question.

Advertisement

Have a question about this answer?

Your email address will not be published. Required fields are marked *

Links and website addresses are not allowed in comments.