GATE CSE
First time here? Checkout the FAQ!
x
0 votes
73 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 | 73 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)   | 217 views


Top Users Apr 2017
  1. akash.dinkar12

    3660 Points

  2. Divya Bharti

    2580 Points

  3. Deepthi_ts

    2040 Points

  4. rude

    1966 Points

  5. Tesla!

    1768 Points

  6. Debashish Deka

    1614 Points

  7. Shubham Sharma 2

    1610 Points

  8. Prashant.

    1492 Points

  9. Arjun

    1472 Points

  10. Arunav Khare

    1464 Points

Monthly Topper: Rs. 500 gift card

22,088 questions
28,063 answers
63,298 comments
24,173 users