I do not understand how to implement AVL Trees. I understand what an AVL Tree is
ID: 3928032 • Letter: I
Question
I do not understand how to implement AVL Trees. I understand what an AVL Tree is conceptually, but I have no idea how to code it. I'm having a little trouble. I've implemented my own BST in the code below but do not know the steps I should take from here to make my BST code into an AVL Tree code. I know that balance factor and height need to be manipulated and rotations in the tree need to be made, but I dont know what to do from here. Assistance would be greatly appreciated on what my nexts steps should be, specifically in my add and remove methods. Thanks.
Explanation / Answer
1. Use inorder traversal and store it in a array.
2. Build a BST using the recursive approach
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.