当前位置:网站首页>Jump table introduction
Jump table introduction
2022-06-30 10:15:00 【A light wind and light clouds】
1、 brief introduction
Orderly collection is common in life , For example, ranking students according to their grades , Rank players according to their scores, etc . For the underlying implementation of ordered sets , You can use arrays 、 Balance tree 、 Chain list, etc . Insertion of array elements 、 Delete ; Although the balanced tree or red black tree is efficient, its structure is complex ; The linked list query needs to traverse all, which is inefficient .Redis Using a jump table . The efficiency of jump table is comparable to that of red and black tree , The implementation is much simpler than the red black tree .
2、 example
Compare ordered linked list and jump list , Find out from the linked list 51
- Ordered list :

The value to find is 51 The elements of , You need to start with the first element and look for 、 Compare to find . A common need 6 Compare it to .
2. Skip list

From 2 Layer start ,1 Node ratio 51 Small node , Compare back .
21 Node ratio 51 Small node , Continue to compare backward , The back is NULL 了 , So from 21 Node down to the 1 layer
In the 1 layer ,41 Node ratio 51 Small node , Keep going backwards ,61 Node ratio 51 Large node , So from 41 Down
In the 0 layer ,51 The node is the node to find , Node found , Co search 4 Time .
It can be seen that the efficiency of jump list is higher than that of ordered linked list
边栏推荐
- 磁悬浮3D灯
- 2021-07-26
- 戴森设计大奖,以可持续化设计改变世界
- Use and description of event delegation
- LVS load balancing
- Guolin was crowned the third place of global popularity of perfect master in the third quarter of 2022
- Cobbler Automated Deployment
- 浏览器复制的网址粘贴到文档是超链接
- How to build an all-in-one database cloud machine that meets the needs of information innovation?
- Theme Studio(主题工作室)
猜你喜欢
随机推荐
7.手机登陆功能开发
How does the diode work?
Application exploration and practice of super convergence in the production environment of insurance industry
基于强化学习的股票量化交易Automated-Stock-Trading-Ensemble-Strategy
机械臂速成小指南(五):末端执行器
South China Industrial Group launched digital economy and successfully held the city chain technology conference
《锦绣中华》中老年公益文旅游-走进佛山敬老院
背课文记单词,读课文记单词,读文章记单词;40篇文章搞定3500词;71篇文章突破中考单词;15篇文章贯通四级词汇;15篇文章贯通六级词汇
著名画家史国良《丰收时节》数字藏品上线长城数艺
MIT-6874-Deep Learning in the Life Sciences Week4
CRF (conditional random field) learning summary
机械臂速成小指南(四):机械臂关键部件之减速机
Open source! Wenxin large model Ernie tiny lightweight technology, accurate and fast, full effect
MIT-6874-Deep Learning in the Life Sciences Week6
调试方法和技巧详解
SolidWorks质量特性详解(惯性张量、转动惯量、惯性主轴)
Forrester senior analyst: five important trends in the development of the hyper convergence market
逸仙电商发布一季报:坚持研发及品牌投入,实现可持续高质量发展
Use and description of event delegation
力扣 428. 序列化和反序列化 N 叉树 DFS







