AVL tree is created by inserting the keys 2, 6, 1, 5, 3, 4, 7 in the given order (Assume the tree is initially empty). Then the level order traversals of the tree would be.
- 2, 1, 3, 5, 4, 6, 7
- 3, 2, 5, 1, 6, 4, 7
- 2, 1, 3, 4, 5, 6, 7
- 3, 2, 5, 1, 4, 6, 7
I know this a very easy question but recently I realized that I am facing problems in the rotations even after knowing all the concepts. After 2 or 3 rotations I get stuck trying to figure out which way to rotate.
Please help me with the proper steps in this question.