Home » Programming & Data Structure » Programming and data structure miscellaneous » Question

Programming and data structure miscellaneous

Programming & Data Structure

  1. A complete n-array tree is a tree in which each node has n children or no children. Let l be the number of internal nodes and L be the number of leaves in a complete n-array tree. If L = 41, and l = 10, what is the value of n?
    1. 3
    2. 4
    3. 5
    4. 6
Correct Option: C

Each internal node has n children & so total nodes n No. of leaf in them is :
⇒ I* (n – 1)
⇒ I(n – 1)
But root can’t produce leaf
I(n – 1) + 1 = L
n = L – 1 / l + 1
n = (41 – 1 )/10 + 1 = 5



Your comments will be displayed only after manual approval.