Given n non-negative integers a1, a2, ..., an , where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endp ...
分类:
其他好文 时间:
2019-10-16 21:41:10
阅读次数:
75
redis是一个key-value储存系统。和Memcached类似,它支持存储的value类型相对更多,包括string(字符串)、list(链表)、set(集合)、zset(sorted set --有序集合)和hash(哈希类型) redis字符串:在redis-Client中执行以下命令: ...
分类:
其他好文 时间:
2019-10-16 19:48:45
阅读次数:
111
什么是Stream? Stream(流)是一个来自数据源的元素队列并且支持聚合操作,元素流在管道中经过中间操作,最终操作得到结果。 数据源:集合,数组,I/O channel,产生器generator。 聚合操作:类似于sql比如:filter,find,map,match,sorted. 生成流: ...
分类:
编程语言 时间:
2019-10-16 18:10:26
阅读次数:
81
题面 Given two integers $n$ and $x$, construct an array that satisfies the following conditions: ·for any element ai in the array, $1≤ai const int maxn ...
分类:
其他好文 时间:
2019-10-15 20:50:19
阅读次数:
69
fsaf 167. Two Sum II - Input array is sorted Easy 167. Two Sum II - Input array is sorted Easy Easy Given an array of integers that is already sorted ...
分类:
其他好文 时间:
2019-10-15 13:00:51
阅读次数:
87
Given a string s , find the length of the longest substring t that contains at most 2 distinct characters. Example 1: Example 2: ...
分类:
其他好文 时间:
2019-10-15 10:15:53
阅读次数:
83
简介 开源(BSD许可)的,内存中的数据结构存储系统,它可以用作数据库、缓存和消息中间件 数据结构 + 字符串(strings) + 散列(hashes) + 列表(lists) + 集合(sets) + 有序集合(sorted sets) https://www.cnblogs.com/jason ...
分类:
其他好文 时间:
2019-10-15 09:58:20
阅读次数:
82
匿名函数:lambda 表达式。普通函数有且只有返回值的函数才能用匿名函数进行简化成一行函数。 匿名函数不单独使用,一般和内置函数结合使用。内置函数中,可加入函数的有min、max、sorted、map、filter 关于匿名函数格式的说明: 函数名 = lambda 参数 :返回值 参数可以有多个 ...
分类:
编程语言 时间:
2019-10-13 23:26:12
阅读次数:
97
Basic navigation by using 'Navigator.push' & 'Navigator.pop()', for example, we have two screen, screen1 and screen2, we want to navigate between two ...
分类:
其他好文 时间:
2019-10-13 21:05:55
阅读次数:
142
这题思路跟2很相似。唯一的不同点在于,2只是正向做加法,但是445是在逆向做加法。这题我的思路是先用stack存住两个list的nodes,然后pop出来的时候做加法。这样就不需要操心reverse linked list这件事了。 ...
分类:
其他好文 时间:
2019-10-13 15:07:06
阅读次数:
97