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

Programming and data structure miscellaneous

Programming & Data Structure

  1. The number of leaf nodes in a rooted tree of n nodes, with each node having 0 or 3 children is
    1. n
      2

    2. (n - 1)
      3

    3. (n - 1)
      2

    4. (2n + 1)
      3
Correct Option: D

Consider following rooted trees

n = 4
(2n + 1)/3 = 3
No. of leaf nodes = 3
Hence (d) is correct option.



Your comments will be displayed only after manual approval.