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-07-26 12:36:28
阅读次数:
88
Palindrome Linked List
Given a singly linked list, determine if it is a palindrome.
Follow up:
Could you do it in O(n) time and O(1) space?
解题思路:
此题的题意为判断单向链表是否为回文。难点就是链表不能随机存取,而且不能反...
分类:
其他好文 时间:
2015-07-26 11:09:57
阅读次数:
87
Problem DescriptionYou may have heard of the book '2001 - A Space Odyssey' by Arthur C. Clarke, or the film of the same name by Stanley Kubrick. In it...
分类:
其他好文 时间:
2015-07-25 22:45:02
阅读次数:
155
文本换行的一些样式属性:1. word-break:break-all;只对英文起作用,以字母作为换行依据2. word-wrap:break-word; 只对英文起作用,以单词作为换行依据3. white-space:pre-wrap; 只对中文起作用,强制换行4. white-space:now...
分类:
Web程序 时间:
2015-07-25 19:43:36
阅读次数:
129
题目描述:Given a singly linked list, determine if it is a palindrome.Follow up:Could you do it in O(n) time and O(1) space? 这题思路就是把单链表的前半部分或后半部分反转,然后比较。s....
分类:
其他好文 时间:
2015-07-25 19:40:11
阅读次数:
106
Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array.
Note:
You may assume that nums1 has enough space (size that is greater or equal to m + n) to hold add...
分类:
编程语言 时间:
2015-07-25 10:43:49
阅读次数:
140
The formula is : Y = (y - 128) * C /128 + (B - 128) + 128. //About add 128 is ture or error ? Cb = [ (Cb - 128)*cos(H) + (Cr - 128)*sin(H)] * S/64 ...
分类:
其他好文 时间:
2015-07-24 20:44:38
阅读次数:
125
空间站是有一些球状的房间组成的,现在有一些房间但是没有相互连接,你需要设计一些走廊使他们都相通,当然,有些房间可能会有重合(很神奇的样子,重合距离是0),你需要设计出来最短的走廊使所有的点都连接。分析:因为给的都是点的坐标,所以构图的时候会有一些麻烦,不过也仅此而已。。。**************...
分类:
其他好文 时间:
2015-07-24 20:30:54
阅读次数:
101
Problem Definition:Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the strin...
分类:
其他好文 时间:
2015-07-23 23:38:33
阅读次数:
118
在了解虚拟文件系统之前 , 需要先了解 Kernel Space 和 User Space 的区别 . 二者的差别在于内存使用上安全机制的差异 . kernel 执行时会占据一段系统的内存空间 , 这段空间便是 Kernel Space , 所有的用户无法和 Kernel Space 直接交互 .....
分类:
其他好文 时间:
2015-07-23 21:10:20
阅读次数:
105