Skip to content

Implementation of the data structure to represent AVL binary trees in java

Notifications You must be signed in to change notification settings

juanArias8/java-avl-tree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Avl Tree


Avl Tree


In computer science, an AVL tree (named after inventors Adelson-Velsky and Landis) is a self-balancing binary search tree. It was the first such data structure to be invented. In an AVL tree, the heights of the two child subtrees of any node differ by at most one; if at any time they differ by more than one, rebalancing is done to restore this property. Lookup, insertion, and deletion all take O(log n) time in both the average and worst cases, where n is the number of nodes in the tree prior to the operation. Insertions and deletions may require the tree to be rebalanced by one or more tree rotations. Avl Tree


User Interface


Avl Tree


Implemented methods


  • insert data
  • delete data
  • search data
  • in order travel
  • pre order travel
  • post order travel
  • DFS travel
  • BFS travel
  • count number of leaves
  • count number of nodes
  • check if tree is full
  • check if tree is complete
  • get tree height
  • get node parent
  • get node ancestors

About

Implementation of the data structure to represent AVL binary trees in java

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages