码迷,mamicode.com
首页 >  
搜索关键字:possible    ( 2665个结果
Project Euler:Problem 37 Truncatable primes
The number 3797 has an interesting property. Being prime itself, it is possible to continuously remove digits from left to right, and remain prime at each stage: 3797, 797, 97, and 7. Similarly we c...
分类:其他好文   时间:2015-06-04 11:56:43    阅读次数:84
LeetCode47:Permutations II
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].这道题是打印一个整...
分类:其他好文   时间:2015-06-04 11:52:07    阅读次数:159
leetcode_78——Subsets(基于DFS的递归)
SubsetsTotal Accepted:49965Total Submissions:176963My SubmissionsQuestionSolutionGiven a set of distinct integers,nums, return all possible subsets.No...
分类:其他好文   时间:2015-06-04 11:25:26    阅读次数:105
【Scramble String】cpp
题目:Given a strings1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representat...
分类:其他好文   时间:2015-06-03 15:33:00    阅读次数:168
Project Euler:Problem 31 Coin sums
In England the currency is made up of pound, £, and pence, p, and there are eight coins in general circulation: 1p, 2p, 5p, 10p, 20p, 50p, £1 (100p) and £2 (200p). It is possible to make £2 in the...
分类:其他好文   时间:2015-06-03 12:00:39    阅读次数:114
leetcode 17 -- Letter Combinations of a Phone Number
Letter Combinations of a Phone Number 题目: Given a digit string, return all possible letter combinations that the number could represent. A mapping of digit to letters (just like on the telepho...
分类:其他好文   时间:2015-06-03 11:56:06    阅读次数:91
python之测试
unittestTest outcomesTests have 3 possible outcomes:okThe test passes.FAILThe test does not pass, and raises an AssertionError exception.ERRORThe test...
分类:编程语言   时间:2015-06-02 21:42:05    阅读次数:144
Word Break II -- leetcode
Given a string s and a dictionary of words dict, add spaces in s to construct a sentence where each word is a valid dictionary word. Return all such possible sentences. For example, given s = "...
分类:其他好文   时间:2015-06-02 18:07:59    阅读次数:88
Project Euler:Problem 24 Lexicographic permutations
A permutation is an ordered arrangement of objects. For example, 3124 is one possible permutation of the digits 1, 2, 3 and 4. If all of the permutations are listed numerically or alphabetically, we...
分类:其他好文   时间:2015-06-02 09:28:13    阅读次数:121
LeetCode 8:String to Integer (atoi)
Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input case...
分类:其他好文   时间:2015-06-02 09:25:09    阅读次数:115
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!