GATE CSE
First time here? Checkout the FAQ!
x
0 votes
66 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 | 66 views
@Habibkhan

Related questions

0 votes
1 answer
1
asked in Databases by debanjan sarkar Loyal (3.4k points)   | 106 views
+1 vote
1 answer
2
asked in Databases by debanjan sarkar Loyal (3.4k points)   | 95 views
+3 votes
2 answers
3
asked in Databases by debanjan sarkar Loyal (3.4k points)   | 194 views


Top Users Mar 2017
  1. rude

    4018 Points

  2. sh!va

    2994 Points

  3. Rahul Jain25

    2804 Points

  4. Kapil

    2606 Points

  5. Debashish Deka

    2092 Points

  6. 2018

    1414 Points

  7. Vignesh Sekar

    1318 Points

  8. Bikram

    1218 Points

  9. Akriti sood

    1166 Points

  10. Sanjay Sharma

    1004 Points

Monthly Topper: Rs. 500 gift card

21,439 questions
26,753 answers
60,919 comments
22,929 users