2 votes 2 votes If a binary tree contains 1056 nodes the what is the height of binary tree?? DS binary-tree + – Hira Thakur asked Aug 21, 2017 Hira Thakur 550 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 6 votes 6 votes For a binary tree with n nodes, Maximum height (when the tree is left-skewed or right-skewed) = n - 1 = 1056 - 1 =1055 Minimum height (for a complete binary tree) = $\left \lceil log_{2}(n + 1) \right \rceil$ - 1 = 11 - 1 = 10 just_bhavana answered Aug 21, 2017 selected Aug 21, 2017 by pawan kumarln just_bhavana comment Share Follow See all 5 Comments See all 5 5 Comments reply Show 2 previous comments Hira Thakur commented Aug 21, 2017 reply Follow Share ⌈log2(1056+1)⌉= 10.04 so taking ceil/floor value?? 0 votes 0 votes just_bhavana commented Aug 21, 2017 reply Follow Share ceil value 1 votes 1 votes rishu_darkshadow commented Sep 18, 2017 reply Follow Share it means when root is at 0, then Minimum height (for a complete binary tree) = ⌈log2(n+1)⌉-1 and when root is at 1, then Minimum height (for a complete binary tree) = ⌈log2(n+1)⌉ plzz clarify me 0 votes 0 votes Please log in or register to add a comment.