Right-BICEPRight首先,我们需要知道什么是正确的.这是最基本的.Boundary边界是否所有的边界条件都正确?CorrectConformance一致性结果值是否和期望值一致.Ordering顺序性值是否跟期望一样,是有序/无序的.Range区间性值是否位于合理的最大值和最小值之间.R...
分类:
其他好文 时间:
2014-06-17 19:51:20
阅读次数:
166
最简单的不相交集的实现,来自MAW的《数据结构与算法分析》。代码:class DisjSet: def __init__(self, NumSets): self.S = [0 for i in range(NumSets+1)] def SetUnion(self, S,...
分类:
编程语言 时间:
2014-06-17 15:17:56
阅读次数:
265
题目
Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.
If such arrangement is not possible, it must rearrange it as the low...
分类:
其他好文 时间:
2014-06-16 18:48:33
阅读次数:
170
Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement is not possibl...
分类:
其他好文 时间:
2014-06-15 21:21:17
阅读次数:
152
1 index unique scan 效率最高,主键或唯一索引2 index fast full scan 读的最快,可以并行访问索引,但输出不按顺序3 index full scan 有顺序的输出,不能并行读索引。4 index range scan 在给定的区间查询5 index s...
分类:
其他好文 时间:
2014-06-15 19:41:17
阅读次数:
169
题目
Given two integers n and k, return all possible combinations of k numbers out of 1 ... n.
For example,
If n = 4 and k = 2, a solution is:
[
[2,4],
[3,4],
[2,3],
[1,2],
[1,3],...
分类:
其他好文 时间:
2014-06-15 14:10:54
阅读次数:
239
【Control Flow】1、for loop中的元素可以省略: 2、for initializer中的变量只能在循环内使用。3、if、else if、else的用法: 最后一个else可选。4、switch用法: 5、range match: 6、tuple作为case: 7、va...
分类:
其他好文 时间:
2014-06-15 14:07:20
阅读次数:
283
本文出自:http://blog.csdn.net/svitter
生成1~10的随机数1000个:
import random
fp = open("test", 'w');
for i in range(1, 1000):
a = random.randint(1,10)
fp.write(str(a)+"\n");
fp.close()
注意:写入文件的不会在最后写...
分类:
编程语言 时间:
2014-06-15 13:39:10
阅读次数:
321
原题地址:https://oj.leetcode.com/problems/add-two-numbers/题意:You are given two linked lists representing two non-negative numbers. The digits are stored i...
分类:
编程语言 时间:
2014-06-15 00:40:44
阅读次数:
328
Decription:Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, gi...
分类:
其他好文 时间:
2014-06-14 19:46:12
阅读次数:
251