Print numbers from 1 to the largest number with N digits by recursion. Notice It's pretty easy to do recursion like: recursion(i) { if i > largest num ...
分类:
其他好文 时间:
2016-04-04 16:16:25
阅读次数:
118
Implement pow(x, n). Notice You don't need to care about the precision of your answer, it's acceptable if the expected answer and your answer 's diffe ...
分类:
其他好文 时间:
2016-04-04 16:09:48
阅读次数:
122
Given a list of numbers, return all possible permutations. Example For nums = [1,2,3], the permutations are: [ [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3, ...
分类:
其他好文 时间:
2016-04-04 14:52:32
阅读次数:
90
Given a permutation which may contain repeated numbers, find its index in all the permutations of these numbers, which are ordered in lexicographical ...
分类:
其他好文 时间:
2016-04-04 14:31:54
阅读次数:
118
Given n and k, return the k-th permutation sequence. Notice n will be between 1 and 9 inclusive. n will be between 1 and 9 inclusive. n will be betwee ...
分类:
其他好文 时间:
2016-04-04 14:29:20
阅读次数:
134
Given an array nums of integers and an int k, partition the array (i.e move the elements in "nums") such that: All elements < k are moved to the left ...
分类:
其他好文 时间:
2016-04-03 20:13:58
阅读次数:
130
Given a string s, cut s into some substrings such that every substring is a palindrome. Return the minimum cuts needed for a palindrome partitioning o ...
分类:
其他好文 时间:
2016-04-03 20:10:22
阅读次数:
103
There are a row of n houses, each house can be painted with one of the three colors: red, blue or green. The cost of painting each house with a certai ...
分类:
其他好文 时间:
2016-04-03 14:30:51
阅读次数:
149
Given a set of n nuts of different sizes and n bolts of different sizes. There is a one-one mapping between nuts and bolts. Comparison of a nut to ano ...
分类:
其他好文 时间:
2016-04-03 14:28:43
阅读次数:
120
文本数据的机器学习自动分类方法(上): http://www.infoq.com/cn/articles/machine-learning-automatic-classification-of-text-data?utm_source=tuicool&utm_medium=referral 文本数 ...
分类:
其他好文 时间:
2016-04-02 20:13:06
阅读次数:
380