- 博客(19)
- 资源 (14)
- 收藏
- 关注
原创 LeetCode First Missing Positive
Given an unsorted integer array, find the first missing positive integer.For example,Given [1,2,0] return 3,and [3,4,-1,1] return 2.Your algorithm should run in O(n) time and uses constant space.思路分析:
2015-03-29 13:01:58 1704
原创 LeetCode Longest Valid Parentheses
Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring.For "(()", the longest valid parentheses substring is "()", which ha
2015-03-29 12:47:21 1629
原创 LeetCode Clone Graph
Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors.OJ's undirected graph serialization:Nodes are labeled uniquely.We use # as a separator for each node, and
2015-03-29 12:36:21 1763
原创 LeetCode Surrounded Regions
Given a 2D board containing 'X' and 'O', capture all regions surrounded by 'X'.A region is captured by flipping all 'O's into 'X's in that surrounded region.For example,X X X XX O O XX X O XX O X X
2015-03-29 12:26:28 1270
原创 LeetCode Best Time to Buy and Sell Stock
Say you have an array for which the ith element is the price of a given stock on day i.If you were only permitted to complete at most one transaction (ie, buy one and sell one share of the stock), des
2015-03-29 12:15:13 1509
原创 LeetCode Best Time to Buy and Sell Stock II
Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum profit. You may complete as many transactions as you like (ie, buy one an
2015-03-29 12:01:45 1467
原创 LeetCode Longest Consecutive Sequence
Given an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given [100, 4, 200, 1, 3, 2],The longest consecutive elements sequence is [1, 2, 3, 4]. Re
2015-03-22 12:08:06 1649
转载 一些我推荐的和想上的网络课程(Coursera, edX, Udacity,MIT OCW)
转载自 http://blog.csdn.net/fightforyourdream/article/details/21314929感觉是很好的CS 网上公开课总结,在终身学习时代,好好利用网络学习资源对于个人成长和发展非常重要。从面向找工作的角度出发,我觉得以下课程有很大帮助:首推Robert Sedgewick,也是我觉得对我帮助最大的老师,讲课特点是能把复杂的算法讲解清楚(典型例子:红黑树
2015-03-21 11:34:57 19493 8
转载 挑战最强大脑——来自全球的14个编码社区
摘要:史蒂夫·乔布斯说过,每个人都应该学习给电脑编写程序的技术,因为这一过程能够教你如何去思考!文中搜集了14个不错的学习资源,帮助你挑战自我,领略并探索计算机领域无穷奥秘。史蒂夫·乔布斯说过,每个人都应该学习给电脑编写程序的技术,因为这一过程能够教你如何去思考!众所周知,编程已成为开发者生命中至关重要的一部分。很多事实表明,越来越多的人不管男女老少都将参与编程这个行业。 学习编程的渠道有很多种,
2015-03-21 11:30:54 2666
转载 LeetCode 题目总结/分类
注:此分类仅供大概参考,没有精雕细琢。有不同意见欢迎评论~利用堆栈:http://oj.leetcode.com/problems/evaluate-reverse-polish-notation/http://oj.leetcode.com/problems/longest-valid-parentheses/ (也可以用一维数组,贪心)http://oj.leetcode.com/proble
2015-03-21 11:29:13 9124
原创 LeetCode Minimum Depth of Binary Tree
Given a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node.思路分析:这题和Maximum Depth of Binary Tree类似,但是现
2015-03-19 13:25:30 1449
原创 LeetCode Same Tree
Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical and the nodes have the same value.思路分析:判断两个树是否相同,基本也
2015-03-19 04:04:40 1554
原创 LeetCode Maximum Depth of Binary Tree
Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.思路分析:这题比较简单,关于树的题目通常都可以用递归解决,这题也不例外,递归解法的思
2015-03-19 03:50:24 1653
原创 LeetCode Reverse Integer
Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321click to show spoilers.Have you thought about this?Here are some good questions to ask before coding. Bonus poi
2015-03-18 14:15:36 1237
原创 LeetCode Insert Interval
Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary).You may assume that the intervals were initially sorted according to their start times.Example 1
2015-03-18 12:50:48 1227
原创 LeetCode Maximum Gap
Given an unsorted array, find the maximum difference between the successive elements in its sorted form.Try to solve it in linear time/space.Return 0 if the array contains less than 2 elements.You may
2015-03-18 08:40:39 2722
原创 Hackerrank Connected Cell in a Grid
Problem StatementYou are given a matrix with m rows and n columns of cells, each of which contains either 1or 0. Two cells are said to be connected if they are adjacent to each other horizontally, ver
2015-03-16 02:59:11 3966
原创 A*搜索算法的JAVA实现 解棋盘爵士游历问题 BFS
A knight moves on a chessboard two squares up, down, left, or right followed by one square in one of the two directions perpendicular to the first part of the move (i.e., the move is L-shaped). Suppos
2015-03-15 11:24:27 1881
原创 LeetCode Min Stack
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) -- Push element x onto stack.pop() -- Removes the element on top of the stack.top() -- Get the
2015-03-09 11:39:49 1360
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关注的人