How many different shapes does maintenance of AA-Tree need to consider?

Category: QuestionsHow many different shapes does maintenance of AA-Tree need to consider?
Editor">Editor Staff asked 1 month ago

How many different shapes does maintenance of AA-Tree need to consider?
 
(a) 7
 
(b) 5
 
(c) 2
 
(d) 3
 
Origin of the question is Binary Trees topic in chapter Binary Trees of Data Structures & Algorithms I
 
I had been asked this question by my college professor while I was bunking the class.

1 Answers
Editor">Editor Staff answered 1 month ago

Right choice is (c) 2
 
To explain: An AA-Tree needs to consider only two shapes unlike a red-black tree which needs to consider seven shapes of transformation.