Follow up for "Search in Rotated Sorted Array":What ifduplicatesare allowed?Would this affect the run-time complexity? How and why?Write a function to...
分类:
其他好文 时间:
2014-06-18 20:54:36
阅读次数:
202
ResolutionRed Hat Enterprise Linux 4, 5 and 6 enable Internet Protocol Version 6 (IPv6) by default. However, in certain situations, some users may fin...
分类:
系统相关 时间:
2014-06-18 20:24:54
阅读次数:
520
如何加锁锁定表的语法: LOCK TABLES tbl_name [AS alias] {READ [LOCAL] | [LOW_PRIORITY] WRITE} [, tbl_name [AS alias] {READ [LOCAL] | [LOW_PRIORITY] WRITE}] ...解.....
分类:
数据库 时间:
2014-06-18 18:40:01
阅读次数:
336
>服务器端:Ubuntu 9.10 - 192.168.1.3客户端:Ubuntu 10.04 - 192.168.1.73我们先来设置一下服务器端的配置1.ubuntu系统安装完之后,rsync服务默认不是启动的,我们要修改下面的文件。$sudo vi /etc/default/rsyncRSYN...
分类:
其他好文 时间:
2014-06-18 18:16:05
阅读次数:
154
WinDirStat is a disk usage statistics viewer and cleanup tool for various versions ofMicrosoft Windows.Note:if you are looking for an alternative forL...
今天做的一个Struts2+MyFaces(JSF)+Spring的应用,为了使用JSF,我的struts.xml中使用了如下代码 ...
分类:
其他好文 时间:
2014-06-18 16:54:18
阅读次数:
441
1.对字符串进行hash大家可以看一下, SHA1 HashesGo by Example写道:The pattern for generating a hash is sha1.New(), sha1.Write(bytes), then sha1.Sum([]byte{}). 附上golang代...
分类:
其他好文 时间:
2014-06-18 16:07:48
阅读次数:
294
Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical an...
分类:
其他好文 时间:
2014-06-18 12:32:58
阅读次数:
169
题目
Write a function to find the longest common prefix string amongst an array of strings.
方法
从第一个字符开始,判断是否相同。
public String longestCommonPrefix(String[] strs) {
if (strs ...
分类:
其他好文 时间:
2014-06-18 11:18:30
阅读次数:
205
只需要对word遍历一遍即可 int write(string word) { int cnt = 0; for(int i = 0 ; i < word.length(); ++ i){ cnt+=word[i]-'A'+1; ...
分类:
其他好文 时间:
2014-06-17 14:01:50
阅读次数:
206