space2comment.pyReplaces space character (‘ ‘) with comments ‘/**/’Example:* Input: SELECT id FROM users* Output: SELECT/**/id/**/FROM/**/usersTested ...
分类:
数据库 时间:
2015-03-17 12:11:20
阅读次数:
256
white-space的值:normal 默认。空白会被浏览器忽略。pre 空白会被浏览器保留。其行为方式类似 HTML 中的 标签。nowrap 文本不会换行,文本会在在同一行上继续,直到遇到 标签为止。pre-wrap 保留空白符序列,但是正常地进行换行。pre-line 合并空白符序列,但是....
分类:
其他好文 时间:
2015-03-17 11:51:34
阅读次数:
116
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 grid...
分类:
其他好文 时间:
2015-03-17 10:28:53
阅读次数:
180
PermGenspace的全称是Permanent Generationspace,是指内存的永久保存区域OutOfMemoryError:PermGenspace从表面上看就是内存益出,解决方法也一定是加大内存。说说为什么会内存益出:这一部分用于存放Class和Meta的信息,Class在被 Lo...
分类:
编程语言 时间:
2015-03-17 10:08:24
阅读次数:
118
题目:Sort a linked list in O(n log n) time using constant space complexity.
思路:要求时间复杂度O(nlogn)
知识点:归并排序,链表找到中点的方法
存在的缺点:边界条件多考虑!!!
/**
* LeetCode Sort List Sort a linked list in O(n log n) time us...
分类:
编程语言 时间:
2015-03-16 23:14:12
阅读次数:
260
Determine whether an integer is a palindrome. Do this without extra space.(source)判断一个数字是否为回文数,并且不使用额外的存储空间。“回文”是指正读反读都能读通的句子,那么回文数,就很容易理解,就是指一个数正反读的值是相同的。还有一个要求是不要使用额外的存储空间。Hints:
要将一个数的最高位与最低位比较,取出一...
分类:
其他好文 时间:
2015-03-16 17:45:42
阅读次数:
142
Given amxnmatrix, if an element is 0, set its entire row and column to 0. Do it in place.click to show follow up.Follow up:Did you use extra space?A s...
分类:
其他好文 时间:
2015-03-16 14:26:38
阅读次数:
105
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-16 12:38:20
阅读次数:
95
题目链接:Unique Paths II
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 resp...
分类:
其他好文 时间:
2015-03-15 23:43:50
阅读次数:
310
Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?思路:1.两个指针,一个走1步,一个走2步,如果相遇则有环注意: 在使用p->nex...
分类:
其他好文 时间:
2015-03-15 19:38:56
阅读次数:
126