1 votes 1 votes minimum no of nodes n AVL tree of height 11 is a)230 b)231 c)232 c)233 Programming in C avl-tree + – Sanjay Sharma asked May 14, 2016 Sanjay Sharma 2.9k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
4 votes 4 votes Ans should be C) 232 (assume root at height 1) minal answered May 14, 2016 edited May 14, 2016 by minal minal comment Share Follow See all 4 Comments See all 4 4 Comments reply vijaycs commented May 14, 2016 reply Follow Share I think with H=1, we need to have at least 2 node and with H=0, N(0)= 1 N(1)=2 And rest procedure is correct but your ans is for h=10 , so for h=11 N(11)= 1 + N(10) + N(9) = 1 + 232 + 143 = 376 1 votes 1 votes minal commented May 14, 2016 reply Follow Share it will be correct , if i assume root node at hight 0 , but i assume root at height 1 so at height 1 no of node is only 1 which is root only ..( i mentioned in diagram ) as here not given what is height of root ... i assumed according to option ... so ans 232 is correct :) 0 votes 0 votes vijaycs commented May 14, 2016 reply Follow Share If you are assuming according to the options given then its alright but in general definition of Height of a tree says root has zero height. I think You can assume level of root as 1 or 0. 3 votes 3 votes Aakash_ commented Dec 29, 2018 reply Follow Share Well the answer is based on assumption that Height=1 at Root, but usually we follow root at height 0. 0 votes 0 votes Please log in or register to add a comment.