in Algorithms edited by
297 views
0 votes
0 votes
Let $T$ be a rooted ternary tree where each internal node of $T$ has a maximum of $3$ children. If root is at depth $0$, then maximum total number of vertices $T$ can have with depth $3$ is ______.
in Algorithms edited by
by
297 views

1 Answer

3 votes
3 votes
Best answer
For the tree to have maximum total no of vertices, all nodes must have 3 children
So total no of nodes for depth 3 = 3^0 + 3^1 + 3^2 + 3^3 = 40
selected by

1 comment

Maximum number of nodes with depth 3 are 3^3. So answer should be 27
1
1
Answer:

Related questions