GATE CSE
First time here? Checkout the FAQ!
x
0 votes
93 views

A 4-ary i.e., either has 0 children or has 4 children tree has 20 leaf nodes. Then the total number of nodes in the tree are ________.

                           The correct answer given is 27 .

Where my solution is wrong?

Let ' I ' denote number of internal nodes so,   

I*4 = I + 20 -1

I = 19/3     therefore 20 leaf nodes in above tree not possible.

closed with the note: Duplicate : http://gateoverflow.in/66314/dsa
asked in Programming by Active (2.1k points)  
retagged by | 93 views
@Habibkhan


Top Users Aug 2017
  1. ABKUNDAN

    4660 Points

  2. Bikram

    4366 Points

  3. akash.dinkar12

    3258 Points

  4. rahul sharma 5

    3042 Points

  5. manu00x

    2682 Points

  6. makhdoom ghaya

    2410 Points

  7. just_bhavana

    2100 Points

  8. Tesla!

    1918 Points

  9. stblue

    1682 Points

  10. joshi_nitish

    1608 Points


24,928 questions
32,024 answers
74,385 comments
30,113 users