Skip to content

My implementation of BST, AVL, Rope with advanced features.

Notifications You must be signed in to change notification settings

emelyantsev/trees

Repository files navigation

Here are my implementations of some tree-like data structures:

  • Binary search tree
  • AVL tree
  • AVL tree with sum
  • AVL trees with split/merge
  • Rope data structure for char strings (based on AVL trees)

I also prepared some tests and benchmark. Benchmark shows that avl performs quite well comparatively to std::set.

Here are the solutions for challenging Stepik problem1 and problem2

Steps to improve:

  • use inheritance
  • use templates
  • add more handy member functions
  • use less recursion
  • add another types of trees (Splay tree, Red-black tree, B-tree)
  • add linux build scripts

Binary search tree

Insertion to BST

AVL tree

Insertion to AVL

Rotations in AVL tree (left/right)

Simple rotations

Rotations in AVL tree (leftRight/rightLeft)

Complicated rotations

About

My implementation of BST, AVL, Rope with advanced features.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published