Determine whether an integer is a palindrome. Do this without extra space.
click to show spoilers.
Some hints:
Could negative integers be palindromes? (ie, -1)
If you are thinking of convert...
分类:
其他好文 时间:
2015-01-29 12:50:33
阅读次数:
138
Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?/** * Definition for singly-linked list. *...
分类:
其他好文 时间:
2015-01-29 12:07:35
阅读次数:
117
Given a stringsand a dictionary of wordsdict, determine ifscan be segmented into a space-separated sequence of one or more dictionary words.For exampl...
分类:
其他好文 时间:
2015-01-29 07:02:47
阅读次数:
150
题目链接:Palindrome Number
Determine whether an integer is a palindrome. Do this without extra space.
Some hints:
Could negative integers be palindromes? (ie, -1)
If you are thinking of converting the...
分类:
其他好文 时间:
2015-01-28 21:30:17
阅读次数:
208
在一些规模稍大的应用中,Java虚拟机(JVM)的内存设置尤为重要,想在项目中取得好的效率,GC(垃圾回收)的设置是第一步。
PermGen space:全称是Permanent Generation space.就是说是永久保存的区域,用于存放Class和Meta信息,Class在被Load的时候被放入该区域Heap space:存放Instance。
GC(Garbage Coll...
分类:
编程语言 时间:
2015-01-28 21:25:16
阅读次数:
401
1. Sed简介
sed 是一种在线编辑器,它一次处理一行内容。处理时,把当前处理的行存储在临时缓冲区中,称为“模式空间”(pattern space),接着用sed命令处理缓冲区中的内容,处理完成后,把缓冲区的内容送往屏幕。接着处理下一行,这样不断重复,直到文件末尾。文件内容并没有 改变,除非你使用重定向存储输出。Sed主要用来自动编辑一个或多个文件;简化对文件的反复操作;编写...
分类:
系统相关 时间:
2015-01-28 15:58:44
阅读次数:
219
more命令,功能类似 cat ,cat命令是整个文件的内容从上到下显示在屏幕上。 more会以一页一页的显示方便使用者逐页阅读,而最基本的指令就是按空白键(space)就往下一页显示,按 b 键就会往回(back)一页显示,...
分类:
系统相关 时间:
2015-01-28 14:52:38
阅读次数:
197
很简单粗暴的思路就是将整数转换为StringBuilder,然后前面和后面的字符分别相比,直至前面和后面的下标相遇程序终止,任何一次比较不想等就不成立。但上面说without extra space,为啥我的程序能通过?好吧,程序不算真的通过,我用到了额外的存储空间。...
分类:
其他好文 时间:
2015-01-28 09:43:58
阅读次数:
163
以下是常用的代码收集,没有任何技术含量,只是填坑的积累。转载请注明出处,谢谢。/*强制不换行*/white-space:nowrap;/*自动换行*/word-wrap: break-word;word-break: normal;/*强制英文单词断行*/word-break:break-all;2...
分类:
Web程序 时间:
2015-01-28 00:43:05
阅读次数:
352
//首先检查程序有没有限入死循环 这个问题主要还是由这个问题 java.lang.OutOfMemoryError: Java heap space 引起的。第一次出现这样的的问题以后,引发了其他的问题。在网上一查可能是JAVA的堆栈设置太小的原因。跟据网上的答案大致有这两种解决方法:1、设置环境变...
分类:
编程语言 时间:
2015-01-27 23:17:58
阅读次数:
202