码迷,mamicode.com
首页 >  
搜索关键字:possible    ( 2665个结果
Leetcode: Best Time to Buy and Sell Stock
My original thought was to calculate all the possible transactions by using nested loop. But got time limit excess error.I knew it can be done in O(n)...
分类:其他好文   时间:2014-05-29 20:44:37    阅读次数:271
[leetcode]Subsets II @ Python
原题地址:https://oj.leetcode.com/problems/subsets-ii/题意:Given a collection of integers that might contain duplicates,S, return all possible subsets.Note:E...
分类:编程语言   时间:2014-05-29 19:10:53    阅读次数:278
【LeetCode】Permutations
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],[3,...
分类:其他好文   时间:2014-05-27 02:42:35    阅读次数:202
Scramble String
Given a strings1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representation...
分类:其他好文   时间:2014-05-26 11:24:36    阅读次数:214
LeetCode——Palindrome Partition
Palindrome Partitioning   Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s. For example, given s = "...
分类:其他好文   时间:2014-05-24 14:29:45    阅读次数:222
C#控制鼠标位置
It is not possible using the .NET BCL. However if you really want it you can use native SetCursorPos inUser32.dll. [DllImport("User32.dll")]private st...
分类:其他好文   时间:2014-05-23 10:16:34    阅读次数:236
LeetCode: Permutations [045]
【题目】 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], [3,1,2], and [3,2,1]. 【题意】 给定一个数组,生成所有的全排列 【思路】 递归,类DFS...
分类:其他好文   时间:2014-05-23 01:08:26    阅读次数:194
LeetCode: Permutations II [046]
【题目】 Given a collection of numbers that might contain duplicates, return all possible unique permutations. For example, [1,1,2] have the following unique permutations: [1,1,2], [1,2,1], and [2,1,1]. 【题意】 给定一个候选数集合,候选集中可能存在重复数,返回所有的排列 【思路】 ...
分类:其他好文   时间:2014-05-22 17:32:17    阅读次数:247
POJ 1458 Common Subsequence.(最长公共子序列)
Description A subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = another sequence Z = is a subsequence of X if there exists a ...
分类:其他好文   时间:2014-05-21 10:58:39    阅读次数:237
LeetCode: Letter Combinations of a Phone Number [018]
【题目】 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 string "23" Output: ["ad", "ae", "af", "bd", "be", "bf",...
分类:其他好文   时间:2014-05-18 07:30:12    阅读次数:340
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!