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.
Who advocated for the adoption of English as the official language for higher education in India?
Which country executed the first carbon credit trade under Article 6?
India’s first E- Waste Eco Park will be constructed in the 21 acres of land in which state/UT in India?
The Oilfields (Regulation and Development) Amendment Bill, 2024, aims to boost investment in the oil and gas sector by:
What is the name of the indigenous genomic chip for cattle, launched by the Prime Minister to improve livestock breeds, and which organization develope...
Which of the following is not associate to swimming?
In which Indian state is the world's first 'Black Tiger Safari' set to be established?
Which institution released the second edition of the 'India Innovation Index'?
What is the percentage of Scheduled Tribes in the Total Population of Uttar Pradesh?
How much stake did State Bank of India acquire in CCIL IFSC Limited?