Determine whether an integer is a palindrome. Do this without extra space.判断一个integer是否为回文。注意不要用额外的空间。另外,注意考虑负数。 1 public class Solution { 2 publ...
分类:
其他好文 时间:
2015-08-08 11:44:40
阅读次数:
83
sed练习1:删除/etc/grub.conf文件中行首的空白符;sed-r‘s@^[[:space:]]+@@g‘/etc/grub.conf2:替换/etc/inittab文件中“id:3:initdaefault:”一行中的数字为5sed‘s@\(id:\)[0-9]\(:initdefault:\)@\15\2@g‘/etc/inittab3:删除/etc/inittab文件中的空白行sed‘/^$/d‘/etc/initt..
分类:
其他好文 时间:
2015-08-08 06:48:43
阅读次数:
176
http://www.zhangxinxu.com/wordpress/?p=4562字符以及HTML实体描述以及说明这是我们使用最多的空格,也就是按下space键产生的空格。在HTML中,如果你用空格键产生此空格,空格是不会累加的(只算1个)。要使用 html实体表示才可累加。为了便于记忆,我总是...
分类:
Web程序 时间:
2015-08-07 21:56:42
阅读次数:
141
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-08-07 17:57:08
阅读次数:
109
U -Space ElevatorTime Limit:1000MSMemory Limit:65536KB64bit IO Format:%I64d & %I64uSubmitStatusDescriptionThe cows are going to space! They plan to ac...
分类:
其他好文 时间:
2015-08-07 13:06:14
阅读次数:
255
这一段时间,Eclipse总是死掉,几乎是稍微操作快一点就会死掉,几分钟一次,搞得人郁闷至极。浪费了不少时间,在网上搜了下,看到很多朋友也出现类似的情况,在网上求救,但是网上的办法都只是说通过修改eclipse.ini文件来加大Eclipse的内存。 自己试了下,发现不管用。今天,又死掉了,不过爆....
分类:
编程语言 时间:
2015-08-07 00:19:24
阅读次数:
121
Given an integer array of sizen, find all elements that appear more than? n/3 ?times. The algorithm should run in linear time and in O(1) space.解法:参考编...
分类:
其他好文 时间:
2015-08-06 23:52:02
阅读次数:
201
https://leetcode.com/problems/length-of-last-word/题目:Given a stringsconsists of upper/lower-case alphabets and empty space characters' ', return the l...
分类:
其他好文 时间:
2015-08-06 22:07:02
阅读次数:
109
Alt + 左方向键: 上一次编辑到的地方(回退)Alt + 右方向键: 上一次编辑到的地方(前进)Ctrl + / : 添加或者消除注释Ctrl + Shift + / : 添加块状注释Alt + Shift + X : 执行Alt + F3: 跳转到代码实现文件Ctrl + Space: 代码助...
分类:
系统相关 时间:
2015-08-06 20:12:11
阅读次数:
141
Given an integer array of size n,
find all elements that appear more than ? n/3 ? times.
The algorithm should run in linear time and in O(1) space.
此题是Majority Element的继续,关于此题可以移步至Majority
Elem...
分类:
其他好文 时间:
2015-08-06 13:28:19
阅读次数:
104