Questions tagged [avl-tree]

Named after its inventors, Adelson-Velskii and Landis, an AVL tree is a self-balancing binary search tree.

Named after its inventors, Adelson-Velskii and Landis, an AVL tree is a self-balancing binary search tree. They were the first dynamically balanced trees to be proposed.

Like red-black trees, they are not perfectly balanced, but pairs of sub-trees differ in height by at most 1, maintaining an O(logn) search time.

842 questions
-5
votes
2 answers

How to simultaneously traverse Binary Tree using recursion and save key to array?

My code is to find a value in AVL tree that is strictly higher than the value inputted. I have tried to use inorder traversal approach it got stuck at saving data to array I'm trying to traverse my BST using recursion and also save data to an array…
-5
votes
1 answer

AVL and Red-Black Trees

I do not know how to do either of these problems. However, I did find example code for the AVL tree here: http://users.cis.fiu.edu/~weiss/dsaajava/code/DataStructures/AvlTree.java However, I still am unsure how to do this. Can someone please help me…
1 2 3
56
57