Given the pre-order traversal, we can easily obtain the necessary Binary Search Tree(BST- not necessarily balanced). However, the problem arises when we have to decide the balancing manually(this was a question in a written quiz). Is it possible to do so in any way?
Edit: I built the BST following the steps in this video: https://www.youtube.com/watch?v=rOiqrg5AH7M. After this step, I proceeding on to balancing the tree following zig-zig and zig-zag rotation(all four possible cases). However, the resulting tree did not have the same preorder traversal.(I unfortunately don't have access to the exact values given in the question, neither to my answer).
My doubt is: how do I obtain the correct AVL tree?