Skip to content
/ treap Public

Yet another implementation of randomized binary search tree

License

Notifications You must be signed in to change notification settings

m110h/treap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Treap

Description from wiki:

"In computer science, the treap and the randomized binary search tree are two closely related forms of binary search tree data structures that maintain a dynamic set of ordered keys and allow binary searches among the keys. After any sequence of insertions and deletions of keys, the shape of the tree is a random variable with the same probability distribution as a random binary tree; in particular, with high probability its height is proportional to the logarithm of the number of keys, so that each search, insertion, or deletion operation takes logarithmic time to perform."

https://en.wikipedia.org/wiki/Treap

About

It's a header only implementation that uses STL for generating random priorities.

Additional material

Building and running unit tests

Don't worry about google test framework, cmake will clone release-1.10.0 and place it to build directory.

$ git clone https://github.com/m110h/treap.git
$ cd treap
$ mkdir build
$ cd build
$ cmake ..
$ make
$ ./bin/unit_tests

About

Yet another implementation of randomized binary search tree

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published