I was looking for a generic implementation of Splay Tree in C++. Splay Tree is a self-balancing binary search tree with the additional property that recently accessed elements are quick to access again. This is useful for competitive analysis and online algorithms. Splay Trees operations such as insertion, look-up and removal are performed in O(log(n)) amortized time.
I found no generic implementation, but the original C implementation of Daniel Sleator and Robert Tarjan. Therefore, I decided to transform this implementation into generic C++ with templates.
Here you have the C++ code for Splay Trees (adapted by the original C version)
Hey, Hardware Hackers! There's A WiFi-Enabled Arduino Now - [image: yun]Lets say you've come up with a brilliant idea for some shiny new piece of hardware. You brush up your coding chops, scratch out a design, and s...
14 minutes ago