Skip to content

Fedchishina/avltree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

avltree

Library for work with AVL trees.

You can create a AVL tree and use a list of functions to work with it.

Tree functions

Empty tree's creation example

t := tree.New[int]() // empty int tree
t := tree.New[string]() // empty string tree

Insert element to tree

t := tree.New[int]() // empty int tree
t.Insert(22, 22) // insert to tree element: key=22, value=22
t.Insert(8, 8) // insert to tree element: key=8, value=8
t.Insert(4, 4) // insert to tree element: key=4, value=4

Delete element by key from tree

t := tree.New[int]()
t.Insert(22, 22)
t.Insert(8, 8)
t.Insert(4, 4)

err := t.Delete(22) // without err

About

Library for work with AVL trees.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages