Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Splay tree
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Disadvantages == The most significant disadvantage of splay trees is that the height of a splay tree can be linear.<ref name="BrinkmannDegraerDeLoof" />{{rp|1}} For example, this will be the case after accessing all ''n'' elements in non-decreasing order. Since the height of a tree corresponds to the worst-case access time, this means that the actual cost of a single operation can be high. However the [[amortized]] access cost of this worst case is logarithmic, O(log ''n''). Also, the expected access cost can be reduced to O(log ''n'') by using a randomized variant.<ref>{{harvnb|Albers|Karpinski|2002}}.</ref> The representation of splay trees can change even when they are accessed in a 'read-only' manner (i.e. by ''find'' operations). This complicates the use of such splay trees in a multi-threaded environment. Specifically, extra management is needed if multiple threads are allowed to perform ''find'' operations concurrently. This also makes them unsuitable for general use in purely functional programming, although even there they can be used in limited ways to implement priority queues. Finally, when the access pattern ''is'' random, the additional splaying overhead adds a significant constant factor to the cost compared to less-dynamic alternatives.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)