GeeksforGeeks » Multiple Choice Questions

A gate 2010 question about trees

(3 posts)

Tags:

  1. ritesh
    guest
    Posted 4 months ago #

    In a binary tree with n nodes, every node has an odd number of descendants. Every node is considered to be its own descendant. What is the number of nodes in the tree that have exactly one child?
    (A) 0 (B) 1 (C) (n−1)/2 (D) n-1

  2. kartik
    Moderator
    Posted 4 months ago #

    I think it should be A) 0. If a node contains only one child, then total number of descendants would be even for that which contradicts the given tree type.

  3. Satya
    guest
    Posted 4 months ago #

    this is full binary tree.....................so ans should be 0


Reply

You must log in to post.

RSS feed for this topic