>Does anyone know where I can find an example of the code?
The following is a good description with C code. Fortunately, the differences are only in details. You can easily figure out how to translate the algorithm to Java.
http://www.stanford.edu/~blp/avl/lib...ing-a-BST.html
Alternatively, you could get a membership with the ACM so that you have access to the digital library. Then you can read all of the wonderful papers concerning this method of globally balancing a binary search tree.
Reputation Points: 6442
Solved Threads: 1393
Bad Cop
Offline 11,807 posts
since Sep 2004