GATE CSE
First time here? Checkout the FAQ!
x
0 votes
74 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 (1.9k points)  
closed by | 74 views
@Habibkhan

Related questions

0 votes
1 answer
1
asked in Databases by debanjan sarkar Loyal (3.5k points)   | 109 views
+1 vote
1 answer
2
asked in Databases by debanjan sarkar Loyal (3.5k points)   | 96 views
+3 votes
2 answers
3
asked in Databases by debanjan sarkar Loyal (3.5k points)   | 222 views


Top Users May 2017
  1. akash.dinkar12

    3152 Points

  2. pawan kumarln

    1616 Points

  3. sh!va

    1580 Points

  4. Arjun

    1336 Points

  5. Devshree Dubey

    1230 Points

  6. Angkit

    1028 Points

  7. Debashish Deka

    1012 Points

  8. Bikram

    972 Points

  9. LeenSharma

    810 Points

  10. srestha

    662 Points

Monthly Topper: Rs. 500 gift card
Top Users 2017 May 22 - 28
  1. pawan kumarln

    242 Points

  2. Ahwan

    138 Points

  3. joshi_nitish

    112 Points

  4. jjayantamahata

    104 Points

  5. Arjun

    64 Points


22,725 questions
29,056 answers
65,053 comments
27,566 users