- 博客(13)
- 资源 (14)
- 收藏
- 关注
原创 LeetCode Climbing Stairs
You are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?思路分析:考察DP,定义ClimbWays数组,ClimbWays[n]
2014-11-29 05:25:23 1837
原创 LeetCode Search in Rotated Sorted Array
Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).You are given a target value to search. If found in the array return its inde
2014-11-29 04:08:29 2242
原创 LeetCode Search Insert Position
Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).You are given a target value to search. If found in the array return its inde
2014-11-29 03:35:44 1794
原创 LeetCode Maximum Product Subarray
Find the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given the array [2,3,-2,4],the contiguous subarray [2,3] has the largest produc
2014-11-29 03:00:31 1999
原创 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,1,2], and [3,2,1].思路分析:这题是Permutations II问题的简
2014-11-23 13:01:17 1968
原创 LeetCode 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].思路分析:Pe
2014-11-23 12:56:52 2330
原创 LeetCode Merge Intervals
题目:Given a collection of intervals, merge all overlapping intervals.For example,Given [1,3],[2,6],[8,10],[15,18],return [1,6],[8,10],[15,18].思路分析:这题关键要想到先对区间排序,然后从前向后扫描,如果下一个没法合并,就添加一个区间;如果可以,还要继续向后看,
2014-11-23 11:02:09 2093
原创 LeetCode Container With Most Water
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two
2014-11-16 10:37:08 2540 1
原创 LeetCode Generate Parentheses
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-11-16 10:28:18 2120
原创 LeetCode Gas Station
There are N gas stations along a circular route, where the amount of gas at station i is gas[i].You have a car with an unlimited gas tank and it costs cost[i] of gas to travel from station i to its ne
2014-11-10 14:01:07 1868
转载 LeetCode 问题难度,面试出现频率及问题相关数据结构和算法
转载自http://blog.csdn.net/kenden23/article/details/14109347。统计了各个问题的难度,频率,数据结构和算法LeetCode Question Difficulty Distribution IDQuestionDiffFreqData StructureAlgorithms 1Two Sum25arra
2014-11-09 12:52:48 9458
原创 LeetCode Two Sum
Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two numbers such that they add up to the target, where i
2014-11-09 11:36:47 2373
原创 LeetCode Validate Binary Search Tree
LeetCode Validate Binary Search TreeGiven a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:The left subtree of a node contains only nodes with keys
2014-11-09 11:02:57 1840
LibSVM Java API调用示例程序
2012-12-16
基于机器学习SNS隐私向导分类器的C++及WEKA实现源码
2012-06-03
基于机器学习的SNS隐私保护策略推荐向导的设计与实现
2012-06-03
基于Apriori、FP-Growth及Eclat算法的频繁模式挖掘源程序
2012-04-24
基于Apriori、FP-Growth及Eclat算法的频繁模式挖掘源程序共享版
2012-04-24
基于Kmeans算法、MBSAS算法及DBSCAN算法的newsgroup18828文本聚类器
2012-04-17
基于贝叶斯及KNN算法的newsgroup文本分类器免积分下载版
2012-03-31
基于贝叶斯及KNN算法的newsgroup文本分类器
2012-03-27
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人