All mock tests are FREE till 31 December — register to save your progress
Unit 7 · Data Structures and Algorithms Paper 2 CS · November 2020

A complete -ary tree is a tree in which each n I node has children or no children. Let be the L number of internal nodes and be the number n L = 41 of leaves in a complete -ary tree. If , I = 10 n and , What is the value of ?

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: C. 5

Explanation

In a full n-ary tree, L = (n − 1)I + 1. 41 = 10(n − 1) + 1 gives n = 5.

More Data Structures and Algorithms questions