This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: >makes it inapplicable to the practice exam question): > >1. To find the minimum height of a Binary Search Tree with n nodes ***-> ceiling[log_2(n+1)] - 1 >ex: ceiling[6.2] = 7 > >ceiling = 9 >ceiling[0.1] = 1 > >ceiling is the smallest integer greater than a number. > >2. The height of a complete binary tree with n nodes is *** -> ceiling[log_2(n+1)] - 1 >3. The maximum number of comparison needed to search for a target in >a full binary search tree is log_2(n) where n is the number of nodes >in the tree. > >4. The maximum height that a binary tree can have if it has n nodes >is n-1. (The tree degenerates to a list). > >5. The maximum number of leaf nodes a binary tree can have if it >has a height of h is >*** -> 2^(h) >6. The maximum number of leaf nodes a binary tree can have if it >has a n nodes is 2^(log_2(n+1)-1) = (n+1)/2 > >I just want to make sure I do the right thing on the final. Sorry for all >the emails. Please let me know what is correct and what formulas I should >go by. > >Erin...
View Full Document
This note was uploaded on 01/17/2012 for the course CSC 1254 taught by Professor Blanks,l during the Fall '08 term at LSU.
- Fall '08