- 博客(8)
- 资源 (1)
- 收藏
- 关注
转载 跟我一起学习VIM - The Life Changing Editor
跟我一起学习VIM - The Life Changing Editor 转载出处:http://ju.outofmemory.cn/entry/79671 前两天同事让我在小组内部分享一下VIM,于是我花了一点时间写了个简短的教程。虽然准备有限,但分享过程中大家大多带着一种惊叹的表情,原来编辑器可以这样强大,这算是对我多年来使用VIM的最大鼓舞吧。所以分享结束之后,将这篇
2015-01-28 12:42:20 1975
原创 Rotate Image
LeetCode Rotate Image You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise). Follow up: Could you do this in-place? 关键地方在于就地。而不用新的内存。
2015-01-25 20:33:04 593
原创 Gray Code
LeetCode Gray Code The gray code is a binary numeral system where two successive values differ in only one bit. Given a non-negative integer n representing the total number of bits in the code
2015-01-22 13:55:01 653
原创 Unique Binary Search Trees
LeetCode Unique Binary Search Trees I II Ⅰ 第一题主要用到了数学推导的方法。令数组arr[i]表示i个节点时BST的数目。则arr[0]=arr[1]=1,arr[2] = 2. 对于已知的arr[0...n]求arr[n+1],此n+1个节点中有个是根节点,令它的左子树个数L(n),右子数节点个数R(n),则左子树有arr[L(n)]中
2015-01-21 21:43:28 485
原创 Best Time to Buy and Sell Stock I II III
Best Time to Buy and Sell Stock I II III I 对于第一题,本质意义是求出数组中某两个元素(day[i],day[i])的最大差值。但是,要求j>i int maxProfit(vector &prices) { if(prices.size() ==0) return 0;
2015-01-19 23:44:10 688
原创 LeetCode Add Two Numbers
LeetCode Add Two Numbers You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two n
2015-01-07 19:56:13 627
原创 LeetCode Triangle
LeetCode Triangle Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below. For example, given the following triangle [
2015-01-04 16:10:53 582
原创 LeetCode Recover Binary Search Tree
LeetCode Recover Binary Search Tree Two elements of a binary search tree (BST) are swapped by mistake. Recover the tree without changing its structure. Note: A solution using O(n) space is
2015-01-01 23:58:05 573
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人