Skip to content

BerWalker/AVLTree-Java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AVLTree-Java

A Java implementation of an AVL Tree, created as a university exercise for the Data Structures course, a self-balancing binary search tree that automatically maintains height balance during insertion and deletion operations. This project provides an efficient and robust data structure for applications that require dynamic data management with balanced performance.

Features

  • Insertion: Adds nodes while maintaining AVL tree balance.
  • Deletion: Removes nodes and rebalances the tree.
  • Automatic Balancing: Ensures the height difference between subtrees remains within a defined limit, optimizing search times.
  • Rotations: Includes necessary single and double rotations (LL, RR, LR, RL) to maintain balance.

Code Overview

  • AVLTree.java: Contains the core AVL tree implementation, including methods for insertion, deletion, and automatic balancing.
  • Node.java: Defines the structure of a tree node, including properties for value, height, and links to child nodes.
  • Main.java: Provides an interactive menu that allows the user to insert, remove, or search for an element in the AVL tree, with automatic balancing after each operation.

About

Java implementation of an AVL tree, featuring node insertion, deletion, and automatic balancing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages