xtaci/algorithms — pull request #31 by afernandez90 (2014-09-10 16:50:00+00:00)
Title: AVL Trees added

Hi, I added a generic AVL tree. I saw there is already an RBTree structure in the repo and uses key/value pairs. In my case, I think AVL trees are not only for dictionaries with key/value pairs. However, the same behavior can be achieved by making the elements in the AVL a key/value pair and redefining the ordering operators, just like when using an std::set.

The AVL is more balanced than an RBT but it takes a bit longer to insert/delete elements due to the rotations. So it's faster for searching but slower for the rest.