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


Top Users Jun 2017
  1. Bikram

    3704 Points

  2. Arnab Bhadra

    1502 Points

  3. Hemant Parihar

    1502 Points

  4. Niraj Singh 2

    1481 Points

  5. junaid ahmad

    1432 Points

  6. Debashish Deka

    1384 Points

  7. Rupendra Choudhary

    1220 Points

  8. rahul sharma 5

    1220 Points

  9. Arjun

    1158 Points

  10. srestha

    1006 Points

Monthly Topper: Rs. 500 gift card
Top Users 2017 Jun 26 - Jul 02
  1. Arjun

    198 Points

  2. akankshadewangan24

    152 Points

  3. Debashish Deka

    138 Points

  4. Hira Thakur

    130 Points

  5. Soumya29

    104 Points


23,399 questions
30,111 answers
67,489 comments
28,424 users