Skip to content

Albertpv95/Tree23

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Tree23

This program creates a generic 2-3 Tree Data Structure in Java.

Methods:

  • add: Adds a new element into the tree.
  • addAll: Adds a collection of elements into the tree.
  • addAllSafe: Adds all the elements into the tree. If one or more elements can't be inserted because they already exists, all the elements inserted before (during this call) are removed from the tree.
  • clear: Removes all of the elements.
  • clone: Creates a copy of a Tree23 instance.
  • contains: Checks if an element exists in a Tree23 instance.
  • find: Searches an element inside of the tree.
  • findMin: Returns the min element of the tree.
  • findMax: Returns the max element of the tree.
  • getLevel: Returns the number of levels of the tree (max deep).
  • inOrder: Prints the elements of the tree in order.
  • isEmpty: Returns a boolean to indicate if the tree is empty or not.
  • modify: Finds an element inside the tree and modifies it.
  • preOrder: Prints the elements of the tree in pre order.
  • remove: Deletes an element from the tree.
  • size: Returns the number of elements inside of the tree.

About

Generic 2-3 Tree Data Structure in Java.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages