给定一个整数序列,求解一个子序列,子序列之和等于给定目标值。子序列满足以下条件:
1)子序列是有序的
2)子序列的元素个数不限,可以是给定元素的重复元素。
3)结果中的子序列是唯一的
原题描述如下:
Given a set of candidate numbers (C) and a target number (T), find all unique combinations ...
分类:
其他好文 时间:
2014-06-11 06:26:03
阅读次数:
302
while loops
定义与实例
i = 0
numbers = []
while i < 6:
print "At the top i is %d" % i
numbers.append(i)
i = i + 1
print "Numbers now: ", numbers
print "At the bottom i is %d" % ...
分类:
编程语言 时间:
2014-06-11 00:59:17
阅读次数:
410
Add Two Numbers
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two...
分类:
其他好文 时间:
2014-06-11 00:35:15
阅读次数:
243
题意:http://acdream.info/problem?pid=1112
Problem Description
Here is Alice and Bob again !
Alice and Bob are playing a game. There are several numbers.First, Alice choose a number n.Then he c...
分类:
其他好文 时间:
2014-06-10 14:48:56
阅读次数:
236
CSV全称 Comma Separated
values,是一种用来存储数据的纯文本文件格式,通常用于电子表格或数据库软件。用Excel或者Numbers都可以导出CSV格式的数据。CSV文件的规则0
开头是不留空,以行为单位。 1 可含或不含列名,含列名则居文件第一行。2 一行数据不垮行,无空行....
分类:
其他好文 时间:
2014-06-10 10:03:30
阅读次数:
204
戳我去解题Given a collection of numbers, return all
possible permutations.For example,[1,2,3]have the following
permutations:[1,2,3],[1,3,2],[2,1,3],[2,3,1...
分类:
其他好文 时间:
2014-06-10 08:42:11
阅读次数:
184
bloomFilter算法的基本原理,设计实现一个生成100万个不重复的随机数。...
分类:
其他好文 时间:
2014-06-10 07:50:25
阅读次数:
228
原题地址:https://oj.leetcode.com/problems/combination-sum/题意:Given
a set of candidate numbers (C) and a target number (T), find all unique
combinations in...
分类:
编程语言 时间:
2014-06-09 17:50:09
阅读次数:
333
原题地址:https://oj.leetcode.com/problems/combination-sum-ii/题意:Given
a collection of candidate numbers (C) and a target number (T), find all unique
combi...
分类:
编程语言 时间:
2014-06-09 17:41:58
阅读次数:
320
Given a sorted linked list, delete all nodes
that have duplicate numbers, leaving onlydistinctnumbers from the original
list.For example,Given1->2->3-...
分类:
其他好文 时间:
2014-06-08 21:56:41
阅读次数:
297