1、 Redis简介redis是Nosql数据库中使用较为广泛的非关系型内存数据库,redis内部是一个key-value存储系统。它支持存储的value类型相对更多,包括string(字符串)、list(链表)、set(集合)、zset(sorted set –有序集合)和hash(哈希类型,类似 ...
分类:
其他好文 时间:
2019-11-23 14:39:37
阅读次数:
90
Given a sorted integer array without duplicates, return the summary of its ranges. Example 1: Input: [0,1,2,4,5,7] Output: ["0->2","4->5","7"] Explana ...
分类:
其他好文 时间:
2019-11-23 09:21:31
阅读次数:
67
```python f = lambda x, y: x * y def func(x,y): return x*y max/min/filter/map/sorted联用 salary_dict = { 'nick': 3000, 'jason': 100000, 'tank': 5000, 's... ...
分类:
其他好文 时间:
2019-11-22 19:19:57
阅读次数:
42
阅读目录(Content) 一、数据类型 二、管理实战 1.通用操作 2.strings(字符)类型操作 3.hash(字典)类型操作 4.List(列表)类型操作 5.Set(集合)类型操作 6.Sorted-Set(有序集合)类型操作 回到顶部(go to top) 一、数据类型 String: ...
分类:
其他好文 时间:
2019-11-21 13:45:26
阅读次数:
77
冒泡排序 ======== 冒泡排序是最简单的排序算法,它通过重复交换相邻元素(如果它们的顺序不正确)来工作。 例如: 第一遍: ( 5 1 4 2 8) ( 1 5 4 2 8),这里,算法比较前两个元素,由于5 1所以交换。 (1 5 4 2 8) (1 4 5 2 8),交换,由于5 4。 ( ...
分类:
编程语言 时间:
2019-11-21 11:55:30
阅读次数:
68
原题链接在这里:https://leetcode.com/problems/missing-element-in-sorted-array/ 题目: Given a sorted array A of unique numbers, find the K-th missing number star ...
分类:
其他好文 时间:
2019-11-21 09:55:39
阅读次数:
96
有序列表merge核心思想-->谁小就选谁加入结果 所以这道题的最核心问题也就找到了,就是要找到任意时刻的最小元素。所以需要维持一个数据结构,随时返回其中最小的元素,也就是最堆 然后这道题的难点就变成了写最小堆的comparator 下方代码中有两种我比较喜欢的方式 class Solution { ...
分类:
编程语言 时间:
2019-11-21 09:21:13
阅读次数:
74
一、 redis 特点 所有数据存储在内存中,高速读写 提供丰富多样的数据类型:string、 hash、 set、 sorted set、bitmap、hyperloglog 提供了 AOF 和 RDB 两种数据的持久化保存方式,保证了 Redis 重启后数据不丢失 Redis 的所有操作都是原子 ...
分类:
其他好文 时间:
2019-11-20 23:19:21
阅读次数:
62
本文转自TTT周清风,地址:https://www.cnblogs.com/tttzqf/p/9270509.html def sort_list_method_1(a): return sorted(a)print(sort_list_method_1([1, 4, 2]))def sort_li ...
分类:
编程语言 时间:
2019-11-18 12:57:36
阅读次数:
103
Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element. Example ...
分类:
其他好文 时间:
2019-11-18 09:20:14
阅读次数:
59