一、filter(function, sequence)对sequence中的item依次执行function(item),将执行结果为True的item组成一个List/String/Tuple(取决于sequence的类型)返回:def f(x): return x % 2 != 0 a...
分类:
编程语言 时间:
2015-01-13 19:32:01
阅读次数:
207
The gray code is a binary numeral system where two successive values differ in only one bit.
Given a non-negative integer n representing the total number of bits in the code, print the sequence of ...
分类:
其他好文 时间:
2015-01-13 17:45:19
阅读次数:
140
Given an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given[100, 4, 200, 1, 3, 2],The longest ...
分类:
其他好文 时间:
2015-01-13 15:45:26
阅读次数:
126
题目描述
Xinlv wrote some sequences on the paper a long time ago, they might be arithmetic or geometric sequences. The numbers are not very clear now, and only the first three numbers of each seq...
分类:
其他好文 时间:
2015-01-13 00:08:33
阅读次数:
258
Implement wildcard pattern matching with support for '?' and '*'.
'?' Matches any single character.
'*' Matches any sequence of characters (including the empty sequence).
The matching should cover t...
分类:
其他好文 时间:
2015-01-12 16:39:22
阅读次数:
168
The count-and-say sequence is the sequence of integers beginning as follows:
1, 11, 21, 1211, 111221, ...
1 is read off as "one
1" or 11.
11 is read off as "two
1s" or 21.
21 is read off as ...
分类:
其他好文 时间:
2015-01-12 09:20:44
阅读次数:
137
Climbing Stairs https://oj.leetcode.com/problems/climbing-stairs/ You are climbing a stair case. It takes n steps to reach to the top. Each time you c...
分类:
其他好文 时间:
2015-01-11 22:56:12
阅读次数:
225
TCP数据包中的序列号(Sequence Number)不是以报文段来进行编号的,而是将连接生存周期内传输的所有数据当作一个字节流,序列号就是整个字节流中每个字节的编号。一个TCP数据包中包含多个字节流的数据(即数据段),而且每个TCP数据包中的数据大小不一定相同。在建立TCP连接的三次握手...
分类:
其他好文 时间:
2015-01-11 21:34:39
阅读次数:
472
1.前言在10g之前,传统的导出和导入分别使用EXP工具和IMP工具,从10g开始,不仅保留了原有的EXP和IMP工具,还提供了数据泵导出导入工具EXPDP和IMPDP。所以在11G的倒库和入库方式中,我们也有两种方式可以选择:传统模式和数据泵模式。传统模式又分为:常规导入导出和直接导入导出。下面以...
分类:
数据库 时间:
2015-01-11 14:50:43
阅读次数:
1486
一、Json的简单介绍从结构上看,所有的数据最终都可以分成三种类型:第一种类型是scalar(标量),也就是一个单独的string(字符串)或数字(numbers),比如“北京”这个单独的词。第二种类型是sequence(序列),也就是若干个相关的数据按照一定顺序并列在一起,又叫做array(数组)...
分类:
编程语言 时间:
2015-01-11 13:32:38
阅读次数:
296