当前位置:网站首页>Redis-链表
Redis-链表
2022-06-26 00:23:00 【云胡不喜呀~】
链表
Redis构建了自己的链表实现,使用地方有列表键、发布与订阅、慢查询、监视器等
listNode{
//前置节点
struct listNode prev;
//后置节点
struct listNode next;
//节点的值
void = value;
}
list{
//头结点
listNode head;
//尾节点
listNode tail;
//链表所包含的节点数量
unsingned long len;
//节点值赋值函数
void dup(void ptr);
//节点释放函数
void free(void ptr);
//节点值对比函数
int match(void ptr,void key)
}
特点
- 有前后指针获取前置后置节点复杂度为O(1)
- 无环:头尾指向null
- list结构获取头结点和尾节点时间复杂度为O(1)
- 链表长度计数 用len计数 获取长度时间复杂度为O(1)
边栏推荐
猜你喜欢

On the difference between strlen and sizeof

Easy to understand C language keyword static

Viwi interface

Abnova actn4 DNA probe solution

General introduction to gun make (2)

王老吉药业“关爱烈日下最可爱的人”公益活动在杭启动

Interpretation of script corresponding to postman assertion

Show spirit chenzitong was invited to be the chief experience officer of the global finals of the sixth season perfect children's model

Energetic girl wangyujie was invited to be the spokesperson for the global finals of the sixth season perfect children's model

二造实务案例答题技巧和举例汇总,满满都是精髓
随机推荐
高手常用的电脑快捷键
Wanglaoji pharmaceutical's public welfare activity of "caring for the most lovely people under the scorching sun" was launched in Hangzhou
xargs 的作用详解
Basic concepts of machine learning
LeetCode 41 ~ 50
PTA class a simulated fifth bomb: 1148-1151
丨EGFR FISH 探针解决方案
输入3个整数,从大到小输出出来
Differences and functions of TOS cos DSCP
Rollback Protection
大周建议自媒体博主前期做这4件事
Pixel6 unlock bootloader
通俗易懂C语言关键字static
cyclegan:unpaired image-to-image translation using cycle-consistent adversarial network
PTA class a simulated first bomb: 1132-1135
JQ 自定义属性取值
readv & writev
Abnova丨CSV 单克隆抗体解决方案
OTA trigger
GNN (graph neural network) introduction vernacular