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

Related questions

0 votes
1 answer
1
asked in Databases by debanjan sarkar Loyal (3.3k points)   | 101 views
+1 vote
0 answers
2
asked in Databases by debanjan sarkar Loyal (3.3k points)   | 84 views
+3 votes
2 answers
3
asked in Databases by debanjan sarkar Loyal (3.3k points)   | 170 views
Top Users Jan 2017
  1. Debashish Deka

    7906 Points

  2. Habibkhan

    4736 Points

  3. Vijay Thakur

    4474 Points

  4. sudsho

    4318 Points

  5. saurabh rai

    4200 Points

  6. Arjun

    3638 Points

  7. Bikram

    3496 Points

  8. santhoshdevulapally

    3470 Points

  9. GateSet

    3228 Points

  10. Sushant Gokhale

    3116 Points

Monthly Topper: Rs. 500 gift card

18,944 questions
23,897 answers
52,114 comments
20,213 users