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
closed | 66 views
@Habibkhan