by katox · 15y ago · 0 comments
To avoid that issue Tarjan and Werneck designed self-adjusting trees so the user doesn't have to understand implementation details while still having access to an effective data structure. There is a free implementation (with relevant papers linked) so if you don't want to reinvent the wheel have a look :)
(A red-black tree is a plain-old binary search tree for everything but modifications.)
edit: For the actual comparison between the three: treaps give no guarantees. Red-black trees sacrifice some lookup speed in favor of insertions.
Do the logarithmic update times in top trees take into account the time to locate the node to update?