LeetCode: CombinationsGiven 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 solu...
分类:
其他好文 时间:
2014-09-04 22:03:20
阅读次数:
221
思路: 1. 类似快排,走两遍(v=1, 分出0;v = 2,分出1)。 2. 计数排序。计数与重写。
思路:递归,每层从前往后逐步取元素。
分类:
其他好文 时间:
2014-09-03 18:06:26
阅读次数:
278
Combination Sum
Given a set of candidate numbers (C) and a target number (T),
find all unique combinations in C where the candidate numbers sums to T.
The same repeated number may be chosen fro...
分类:
其他好文 时间:
2014-09-02 17:48:05
阅读次数:
244
Fermat’s Chirstmas Theorem
Time Limit: 1000ms Memory limit: 65536K 有疑问?点这里^_^
题目描述
In a letter dated December 25, 1640; the great mathematician Pierre de Fermat wrote to Marin...
分类:
其他好文 时间:
2014-09-02 10:35:34
阅读次数:
254
Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.
For example, given n = 3, a solution set is:
"((()))", "(()())", "(())()",
"()(())", "()()()...
分类:
其他好文 时间:
2014-09-02 10:29:44
阅读次数:
186
Givennpairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, givenn= 3, a solution set is:"((()))...
分类:
其他好文 时间:
2014-09-02 10:26:54
阅读次数:
217
Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.Each numb...
分类:
其他好文 时间:
2014-09-02 00:07:23
阅读次数:
258
Given a digit string, return all possible letter combinations that the number could represent.
A mapping of digit to letters (just like on the telephone buttons) is given below.
Input:Digit st...
分类:
其他好文 时间:
2014-09-01 21:15:03
阅读次数:
223
Combination Sum II
Total Accepted: 13710 Total
Submissions: 55908My Submissions
Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C wher...
分类:
其他好文 时间:
2014-09-01 14:03:23
阅读次数:
188
一、前言 首先看看一道阿里这期网申的题目吧!1.找出下面优先级相同的选择器 A. img.thumb:after B.[data-job="frontend"]::first-letter C. #main::before D. [...
分类:
Web程序 时间:
2014-09-01 14:00:03
阅读次数:
255