Determine whether an integer is a palindrome. Do this without extra space.
检测当前数字是否是回文数字,同时不能增加额外的内存空间,这里一个注意的点就是 负数 都不可能是回文数字
然后是检测出来每一位数字进行比较
代码还是写得比较繁琐,主要的一个点就是数字的位数是基数位和偶数位的时候处理的过程是不同的
c...
分类:
其他好文 时间:
2015-04-08 16:37:01
阅读次数:
115
检查数据库日志,有如下报错信息:Error: 9002, Severity: 17, State: 4.
The transaction log for database 'SharedServices1_Search_DB' is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc...
分类:
数据库 时间:
2015-04-08 16:33:30
阅读次数:
206
Given two sorted integer arrays A and B, merge B into A as one sorted array.
Note:
You may assume that A has enough space (size that is greater or equal to m + n) to hold additional elements from ...
分类:
编程语言 时间:
2015-04-08 15:04:58
阅读次数:
152
www.sharewithu.com/space/space.php?id=2409967www.sharewithu.com/space/space.php?id=2409969www.sharewithu.com/space/space.php?id=2410146www.sharewithu....
分类:
移动开发 时间:
2015-04-08 01:05:29
阅读次数:
187
Given a linked list, determine if it has a cycle in it.Can you solve it without using extra space?每个节点再开辟一个属性存放是否访问过,这样遍历一遍即可知道是否有环。但为了不增加额外的空间,可以设置两个...
分类:
其他好文 时间:
2015-04-08 01:01:24
阅读次数:
120
题目链接:Merge Sorted Array
Given two sorted integer arrays A and B, merge B into A as one sorted array.
Note:
You may assume that A has enough space (size that is greater or equal to m + n) to hold ad...
分类:
其他好文 时间:
2015-04-07 23:34:47
阅读次数:
349
lua中的正则表达式,规则如图:
常用示例,代码如下:
-- 去掉首尾所有空格
function trim(s)
return (string.gsub(s, "^%s*(.-)%s*$", "%1"))
end
local s = " space "
local txt = trim(s)
print(string.len(s), string.len(txt))...
分类:
其他好文 时间:
2015-04-07 17:44:59
阅读次数:
422
text-overflow用来设置是否使用一个省略标记(...)标示对象内文本的溢出。语法:但是text-overflow只是用来说明文字溢出时用什么方式显示,要实现溢出时产生省略号的效果,还须定义强制文本在一行内显示(white-space:nowrap)及溢出内容为隐藏(overflow:hid...
分类:
其他好文 时间:
2015-04-07 17:05:26
阅读次数:
123
今天在eclipse 中测试包含大量数据的程序时,报出了下面的错误:
java.lang.OutOfMemoryError: Java heap space
从上边的异常信息可以看到,JVM 需要使用的内存已经超过了我们分配给虚拟机可以使用的最大内存。所以问题就转化为如何设置eclipse 中jvm 的最大内存。
一、 尝试修改Eclipse.i...
分类:
系统相关 时间:
2015-04-07 13:52:37
阅读次数:
227
SCP命令是用户通过网络将一台Linux服务器的文件复制到另一台Linux服务器,方法如下:一:从本地复制到远程复制文件:命令格式:scp local_file remote_username@remote_ip:remote_folder例子:scp /home/space/music/1.mp3...
分类:
系统相关 时间:
2015-04-07 13:36:59
阅读次数:
215