摘要: 因为redis是用c写的,c中没有自带的map,所以redis自己实现了map,来看一下redis是怎么实现的。1、redis字典基本数据类型redis是用哈希表作为字典的底层实现,dictht是哈希表的定义:typedef struct dictht { // 哈希表节点指针数组(俗称桶,b... 阅读全文
posted @ 2015-05-25 22:30 丶Blank 阅读(893) 评论(0) 推荐(0) 编辑
摘要: Given a linked list and a valuex, partition it such that all nodes less thanxcome before nodes greater than or equal tox.You should preserve the origi... 阅读全文
posted @ 2015-05-25 17:07 丶Blank 阅读(198) 评论(0) 推荐(0) 编辑
摘要: Given an array ofnpositive integers and a positive integers, find the minimal length of a subarray of which the sum ≥s. If there isn't one, return 0 i... 阅读全文
posted @ 2015-05-25 16:38 丶Blank 阅读(174) 评论(0) 推荐(0) 编辑