Follow up for "Unique Paths":
Now consider if some obstacles are added to the grids. How many unique paths would there be?
An obstacle and empty space is marked as 1 and 0 respectively
in the ...
分类:
其他好文 时间:
2015-03-28 01:17:37
阅读次数:
137
问题描述:Given a sorted array, remove the duplicates in place such that each element appear onlyonceand return the new length.Do not allocate extra space ...
分类:
其他好文 时间:
2015-03-21 21:16:20
阅读次数:
118
问题描述Given a linked list, return the node where the cycle begins. If there is no cycle, returnnull.Follow up:Can you solve it without using extra space...
分类:
其他好文 时间:
2015-03-21 15:32:34
阅读次数:
155
【题目】
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 pretty straight forward. Could...
分类:
其他好文 时间:
2015-03-21 12:42:54
阅读次数:
129
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 ...
分类:
其他好文 时间:
2015-03-21 12:39:00
阅读次数:
177
题目链接:Set Matrix Zeroes
Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place.
Follow up:
Did you use extra space?
A straight forward solution using O(mn) spa...
分类:
其他好文 时间:
2015-03-20 22:00:08
阅读次数:
135
Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string.If the last word ...
分类:
其他好文 时间:
2015-03-20 16:16:40
阅读次数:
124
定义和用法white-space 属性设置如何处理元素内的空白可能的值值描述normal默认。空白会被浏览器忽略。pre空白会被浏览器保留。其行为方式类似 HTML 中的 标签。nowrap文本不会换行,文本会在在同一行上继续,直到遇到 标签为止。pre-wrap保留空白符序列,但是正常地进行换.....
分类:
Web程序 时间:
2015-03-20 16:07:21
阅读次数:
135
Follow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty space i...
分类:
其他好文 时间:
2015-03-20 15:58:44
阅读次数:
116
分别用box2d和chipmunk实现了一下,不过box2d没整理,也懒得整理了。chipmunk整理了一下,分享给大家吧。刚开始研究,抛砖引玉简要说明:1、初始化物理环境,增加边界initPhysics: function () { var space = this.space ; ...
分类:
Web程序 时间:
2015-03-20 15:58:01
阅读次数:
273