2 2 votes Let $T$ be a $N$-ary tree where each internal node of $T$ have at most $N$ children. Let the maximum depth of any node of $T$ be $m.$ What is the maximum number of leaves that $T$ can have when root at depth $0$? $N$ $N * m$ $N^m$ $m^N$ Programming in C tbb-ds-2 data-structures tree maximum leaves + – Bikram 1.3k views answer comment Share Follow Print 0 reply Please log in or register to add a comment.
Best answer 3 3 votes Let the tree T is 3 ary tree , means N = 3 Root None / | \ m = 0 => 3^0=1 node 1 2 3 m = 1 => 3^1=3 node / | \ / | \ / | \ m = 2 => 3^2=9 node at depth m , maximum number of nodes 3^m , we can see from this picture. so if m is the maximum depth of any node of tree T then maximum number of leaves N^m for a N ary tree. Bikram answered Dec 20, 2016 • selected Aug 16, 2019 by Bikram Bikram comment Share Follow 0 reply Please log in or register to add a comment.