Skip to content

zacgeis/rust-avl-tree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust AVL Tree

Overview

I'm in the process of learning Rust and I wanted to explore implementing a somewhat non-trivial tree structure. For the specific structure, I chose to implement an AVL-like tree. The implementation is somewhat basic, but it does support insert, contains, iter, and delete all with self-balancing.

See the test cases for example usage and more details.

This is entirely a toy implementation and should not be used in any real setting. Various aspects are non-optimal:

  • Height and balance factor are not cached in any way.
  • contains doesn't use the Borrow trait bound approach.
  • The memory layout is not cache friendly.
  • Etc.

Overall, I found the experience very insightful.

About

Toy Rust AVL tree implementation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages