- 博客(10)
- 资源 (6)
- 收藏
- 关注
原创 Jump Game(LeetCode)
Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximum jump length at that position.Determine if you ar...
2018-07-08 16:13:10 184
原创 Combination Sum IV(LeetCode)
Given an integer array with all positive numbers and no duplicates, find the number of possible combinations that add up to a positive integer target.Example:nums = [1, 2, 3] target = 4 The possible ...
2018-07-08 15:05:49 230
原创 Combination Sum III(LeetCode)
Find all possible combinations of k numbers that add up to a number n, given that only numbers from 1 to 9 can be used and each combination should be a unique set of numbers.Note:All numbers will be p...
2018-07-08 10:36:53 177
原创 Combination Sum II(LetCode)
Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidates where the candidate numbers sums to target.Each number in candidates may o...
2018-07-08 09:55:15 131
原创 Permutation Sequence(LeetCode)
The set [1,2,3,...,n] contains a total of n! unique permutations.By listing and labeling all of the permutations in order, we get the following sequence for n = 3:"123""132""213""231""312""321"Giv
2018-07-07 22:01:34 138
原创 Permutations II(LeetCode)
Given a collection of numbers that might contain duplicates, return all possible unique permutations.Example:Input: [1,1,2] Output: [ [1,1,2], [1,2,1], [2,1,1] ]这一题和上一题类似,就是数组里有重复的元素。思路:递归+深度优先搜...
2018-07-07 17:40:11 220
原创 Permutations(LeetCode)
Given a collection of distinct integers, return all possible permutations.Example:Input: [1,2,3] Output: [ [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], [3,2,1] ]求全排列。思路:递归+深度优先搜索因为排列要使用所有数...
2018-07-07 17:19:08 512
原创 Combination Sum(Leetcode)
Given a set of candidate numbers (candidates) (without duplicates) and a target number (target), find all unique combinations in candidates where the candidate numbers sums to target.The same repeated...
2018-07-07 15:47:38 199
原创 字符串反转,c和c++实现
区别在于用char* 还是stringc语言:char* reverseString(char* s) { int len = strlen(s); int i = 0; char ch; while (i < len / 2) { ch = *(s + i); *(s + i) = *(s + len - 1 - i); *(s + len - 1 - i) = ch;...
2018-07-07 12:10:25 303
原创 Combinations(LeetCode)
Given two integers n and k, return all possible combinations of k numbers out of 1 ... n.Example:Input: n = 4, k = 2 Output: [ [2,4], [3,4], [2,3], [1,2], [1,3], [1,4], ]求组合数。思路:递归+深度优先搜索(...
2018-07-06 22:33:33 231
SIFT算法的matlab实现
2017-12-04
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人