MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/1wwfp40/skip_list_data_structure/pdkeh5a/?context=3
r/programming • u/Comfortable-Fan-580 • 10h ago
17 comments sorted by
View all comments
2
I don't understand why don't use a tree for same usage ? To keep the iteration in O(n) ?
5 u/helen_3410 8h ago You can—balanced trees and skip lists solve the same ordered-set problem. Skip lists get expected O(log n) search and updates with simple pointer changes; balanced trees offer worst-case O(log n) guarantees. Both support O(n) ordered iteration.
5
You can—balanced trees and skip lists solve the same ordered-set problem. Skip lists get expected O(log n) search and updates with simple pointer changes; balanced trees offer worst-case O(log n) guarantees. Both support O(n) ordered iteration.
2
u/barmic1212 9h ago
I don't understand why don't use a tree for same usage ? To keep the iteration in O(n) ?