均匀放置的跳过指针
我正在阅读有关跳过指针的内容,有人建议最好放置均匀间隔的 sqrt(len of list) 跳过指针。谁能告诉我“均匀分布”是什么意思?我还想看看用 Java 或 Python 做这样的事情的代码
I was reading about skip pointers and someone suggested that it is best to put evenly spaced sqrt(len of list) skip pointers. Can someone tell me what "evenly spaced" means here? I will also like to see the code of doing such a thing in Java or Python
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为你的朋友正在谈论跳过列表。通常,跳过指针在列表中随机放置。均匀间隔的指针是指在整个列表中确定性地间隔它们而不是随机放置它们。这样的方案可能会提供更快的读取速度,但在写入列表时可能需要更多计算。
I think your friend was talking about skip lists. Usually the skip pointers are placed randomly through the list. Evenly spaced pointers refers to deterministically spacing them throughout the list instead of randomly placing them. Such a scheme would probably give faster reads, but would probably require more calculation when writing to the list.