menu
techminis

A naukri.com initiative

google-web-stories
Home

>

Data Science News

>

Why Are Sk...
source image

Dev

2w

read

139

img
dot

Image Credit: Dev

Why Are Skip Lists Less Commonly Used Than BSTs?

  • Skip lists are a data structure that can serve as an alternative to binary search trees (BSTs).
  • Skip lists are designed to provide tree-like performance and are relatively easy to implement and understand.
  • BSTs, especially balanced BSTs, are more commonly used than skip lists for several practical and technical reasons.
  • BSTs were introduced in 1960 while skip lists were invented in 1989.
  • Skip lists have an expected time complexity of O(log n) for search, insertion, and deletion. However, their worst-case time complexity can degrade to O(n).
  • Balanced BSTs perform rebalancing after every insertion or deletion, ensuring a worst-case time complexity of O(log n).
  • Skip lists require multiple pointers per node to create their hierarchical structure, resulting in higher memory consumption.
  • Balanced BSTs have a deterministic structure, ensuring that the same operations on the same data always yield identical results.
  • Balanced BSTs offer a wide range of advanced query operations based on order, such as finding the minimum and maximum values, ordered traversal, and range queries.
  • Skip lists are worth considering as a viable alternative depending on the scenario.

Read Full Article

like

8 Likes

For uninterrupted reading, download the app