Multiple choice

In a complete k-ary, every internal node has exactly k children. The number of leaves in such a tree with n internal nodes is

  1. n k

  2. (n − 1)k + 1

  3. n(k − 1) + 1

  4. n(k − 1)

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

No. of internal nodes = n Each node has K children So total nK Leaf nodes = nK − n = n(K − 1) So considering not node also No. of leaf nodes = n(K − 1) + 1