Skip to content

Latest commit

 

History

History
13 lines (8 loc) · 608 Bytes

README.md

File metadata and controls

13 lines (8 loc) · 608 Bytes

Splay-Tree

Splay Tree Implementation in C++

—SplayTrees are a form of binary search tree with the unique property that the most recently accessed element is located at the root of the tree to save access time.

Splay trees have time complexity of O(logN) in most cases but can have O(N) in some cases. Unlike AVL/Red-Black trees Splay Trees do not have a strictly self-balancing feature. Balancing is achieved using rotations. Splay trees are faster as they are not strictly balanced.

To Use

  • include the header file
  • create a splay tree object
  • use the methods to use the splay tree