0 votes 0 votes Max no. of node in k-array tree when height 'h' is given The number of internal nodes in 3-ary tree of height 4 is: ___ 40 or 121 which one is right? mohitbawankar asked Dec 12, 2017 mohitbawankar 340 views answer comment Share Follow See all 2 Comments See all 2 2 Comments reply abhishek tiwary commented Dec 12, 2017 reply Follow Share 40?? 0 votes 0 votes saxena0612 commented Dec 13, 2017 reply Follow Share ......................................... 0 votes 0 votes Please log in or register to add a comment.
1 votes 1 votes total nodes =121 L+I=121-------(1) L=I(n-1)+1 for n-ary tree so L=I(3-1)+! L=2I+1----------(2) substitute 2 in 1 3I+1=121 I=40 chandra sai answered Dec 12, 2017 chandra sai comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes with 4 height total no of nodes=121=n with x internal nodes total no of nodes=x*3+1=121 x*3=120 x=40 =no of internal nodes abhishek tiwary answered Dec 12, 2017 abhishek tiwary comment Share Follow See all 2 Comments See all 2 2 Comments reply mohitbawankar commented Dec 13, 2017 reply Follow Share total node = k^(h+1)-1/k-1 this is right for calculating total number of nodes? k- no. of array h- height 0 votes 0 votes Ashwin Kulkarni commented Dec 13, 2017 reply Follow Share Yes it is right! @mohit 0 votes 0 votes Please log in or register to add a comment.