I decided to learn about balanced search trees, so I picked 2-3-4 and splay trees.
What are the examples of splay trees usage in the real world?
In this Cornell: http://www.cs.cornell.edu/courses/cs3110/2009fa/recitations/rec-splay.html I read that splay trees are 'A good example is a network router'.
But from rest of the explanation seams like network routers use hash tables and not splay trees since the lookup time is constant instead of O(log n).
Best Answer
It is important to note that hash tables only have average access time of
O(1)
. This means a particular operation could be much worse. Additionally, there are several requirements for properly formed hash trees:It sounds like the course mentions that in many routers these issues have been solved so they use a hash table for storage. However there are several advantages to splay trees
Unfortunately this doesn't answer your question directly, but hopefully it sheds some light on why that is the case.
BTW, here are some notes on why routers may have moved away (these line up with advantages):