Start learning 50% faster. Sign in now
An AVL tree is a self-balancing binary search tree where the balance factor of each node (height difference between the left and right subtrees) is kept between -1 and +1. When the balance factor becomes +2 or -2 after an insertion, the tree violates this property and must be rebalanced using rotations. The type of rotation depends on the imbalance: • Single Rotation: Used when the imbalance is in one direction, either left-heavy (LL rotation) or right-heavy (RR rotation). • Double Rotation: Used when the imbalance involves opposite directions, such as left-right (LR rotation) or right-left (RL rotation). Option 2 is correct because the AVL tree algorithm always rebalances the tree after insertion using rotations to ensure logarithmic height. Why Other Options Are Incorrect: 1. Tree becomes unbalanced and cannot be used: Incorrect, as AVL trees are explicitly designed to handle imbalances. 2. Insertion is rejected: Incorrect, as rebalancing is performed instead of rejecting insertions. 3. Height increases by 2: Incorrect, as height adjustments depend on rebalancing and typically increase by at most 1. 4. Balance factor is ignored: Incorrect, as the balance factor is central to maintaining AVL tree properties.
Under which scheme did the Union Budget 2025 allocate health benefits for gig workers registered under the e-Shram portal?
The Reserve Bank of India (RBI) has asked banks and financial institutions to adopt by _______ a widely accepted Alternative Reference Rate, such as the...
New Kwanza is the currency of which country?
The Reserve Bank of India has partially relaxed restrictions on SBM Bank India by allowing ATM/POS transactions under the Liberalised Remittance Scheme ...
Who among the following is ranked 12th in the Bloomberg Billionaires Index with a wealth of $110 billion?
What digital initiative was launched by the Union Ministry of Social Justice and Empowerment at the Shilp Samagam Mela to support marginalized artisans?
Recently new Crab Species named Ghatiana Dwivarna has been discovered from Which state?
For the ‘Operation Vigilant Storm’ a defence military exercise USA and which other country has participated from 31st October to 4th November, 2022?...
Who has been appointed as the new Country Manager for India by Visa, the global digital payments platform?
The government has mobilized a gross amount of Rs 5.77 lakh crore by issuing dated securities in the current financial year up to July 31, 2023. The cen...