5 votes 5 votes The minimum height of an AVL tree with $n$ nodes is $\text{Ceil } (\log_2(n+1))$ $1.44\ \log_2n$ $\text{Floor } (\log_2(n+1))$ $1.64\ \log_2n$ DS isro-2020 data-structures avl-tree normal + – Satbir asked Jan 13, 2020 • edited Apr 10, 2020 by go_editor Satbir 5.9k views answer comment Share Follow See 1 comment See all 1 1 comment reply Yaman Sahu commented May 14, 2020 reply Follow Share https://www.geeksforgeeks.org/practice-questions-height-balancedavl-tree/ acoording to this option c match 1 votes 1 votes Please log in or register to add a comment.
3 votes 3 votes $\underline{\textbf{Answer:}\Rightarrow}\;\textbf{(c)}$ $\text{Minimum height} =\color{magenta}{\mathbf{\bigg\lfloor \log_2 \left ( n + 1 \right )\bigg \rfloor}}$ $\text{Maximum height} =\color{blue}{\mathbf{1.44\log_2n}}$ `JEET answered Jan 13, 2020 • edited Sep 25, 2020 by `JEET `JEET comment Share Follow See all 15 Comments See all 15 15 Comments reply Show 12 previous comments srestha commented Jan 23, 2020 reply Follow Share What about 1.44logn? 0 votes 0 votes kpc commented Jan 23, 2020 reply Follow Share It is maxheight 1.44log(3)=1.44*2=2.88=floor(2.88)=1(if indexing starts from 0) If indexing starts from 1 than max height should be 2.than we have to take floor(1.44log(n))+1. Actually I referred this link.https://www.geeksforgeeks.org/practice-questions-height-balancedavl-tree/ 0 votes 0 votes `JEET commented Jan 23, 2020 reply Follow Share actually the unnecessarily added $+1$ for trying to make the answer different from the standard $\log \mathbf n$ and failed miserably to justify now. :D 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes If there are n nodes in AVL tree, minimum height of AVL tree is floor(log2n). Option C Explanation : Please refer the link below https://www.geeksforgeeks.org/practice-questions-height-balancedavl-tree/ nkg_master9 answered Jan 21, 2020 nkg_master9 comment Share Follow See 1 comment See all 1 1 comment reply JashanArora commented Feb 21, 2020 i edited by JashanArora Nov 15, 2020 reply Follow Share For $7$ nodes, minimum height = $2$. Options B and D give fractional heights. So, they’re wrong. Options A and C give $3$. So, the question assumes the root to be at height $1$. Rewriting: For $7$ nodes, maximum height = $3$. For $6$ nodes, it will still be $3$. Only Option A satisfies this. The answer is also Option A in the official answer key. Edit: Meant to comment on the question, lol. Not on this answer. 2 votes 2 votes Please log in or register to add a comment.
0 votes 0 votes As we know there are minimum of 4 node in height 2 in avo tree because minimum height is h(no of node-1) and h(no of node -2) So putting n=4 in all option we will obtain h=2 in floor(log2(n+1)) Pars answered May 4, 2020 Pars comment Share Follow See all 0 reply Please log in or register to add a comment.