Write a function to find the longest common
prefix string amongst an array of strings.
要减少比较次数。在实现过程中我的想法是,2个2个比较,那么只要遍历一次数组就好。而且,在比较过程中,以较短的那个长度作为最大比...
分类:
其他好文 时间:
2014-05-26 21:29:43
阅读次数:
203
ShellLinux Shell脚本教程:30分钟玩转Shell脚本编程Bash
Shell字符串操作小结vivim使用vi、vim删除以及其他命令Vim静态模板文件打造自己的vim界面命令linux中grep命令的用法linux之sort用法gawkgawk手册Common
threads: Aw...
分类:
系统相关 时间:
2014-05-26 20:38:26
阅读次数:
332
package com.resoft.util.common;import
java.io.File;import java.io.FileInputStream;import java.net.URL;import
java.util.Properties;import org.apache.lo...
分类:
其他好文 时间:
2014-05-26 16:11:33
阅读次数:
217
Given a strings1, we may represent it as a
binary tree by partitioning it to two non-empty substrings recursively.Below is
one possible representation...
分类:
其他好文 时间:
2014-05-26 11:24:36
阅读次数:
214
code如下:
//Longest common sequence, dynamic programming method
void FindLCS(char *str1, char *str2)
{
if(str1 == NULL || str2 == NULL)
return;
int length1 = strlen(str1)+1;
int length2 = strlen(...
分类:
其他好文 时间:
2014-05-26 04:56:50
阅读次数:
215
继续并发专题~
这次介绍CyclicBarrier:看一眼API的注释:
/**
* A synchronization aid that allows a set of threads to all wait for
* each other to reach a common barrier point. CyclicBarriers are
* useful in program...
分类:
编程语言 时间:
2014-05-25 18:15:06
阅读次数:
316
HttpClient 是 Apache Jakarta Common 下的子项目,可以用来提供高效的、最新的、功能丰富的支持 HTTP 协议的客户端编程工具包,并且它支持 HTTP 协议最新的版本和建议。...
分类:
移动开发 时间:
2014-05-25 07:04:10
阅读次数:
306
修改common.py把 -Xmx4096m 中的 4096改成2048具体做法:1.
patchrom目录下搜索文件common.py 2.文档中搜索-Xmx4096m 3.-Xmx4096m 改为 -Xmx2048m
分类:
编程语言 时间:
2014-05-24 09:48:41
阅读次数:
252
简介
此文档描述了如何配置Hadoop HTTP web控制台,去要求用户认证。
默认地,Hadoop HTTP web控制台(JobTracker, NameNode, TaskTrackers 和 DataNodes)不需要任何认证就允许访问。
与Hadoop RPC相似, Hadoop HTTP web控制台可以被配置为需要使用HTTP SPNEGO协议认证(由FireFo...
分类:
Web程序 时间:
2014-05-22 23:40:12
阅读次数:
347
题目:http://poj.org/problem?id=1226
http://acm.hdu.edu.cn/showproblem.php?pid=1238
其实用hash+lcp可能也可以,甚至可能写起来更快,不过我没试,我最近在练习后缀数组,所以来练手
后缀数组的典型用法之一----------------后缀数组+lcp+二分
思路:1、首先将所有的字符串每读...
分类:
其他好文 时间:
2014-05-22 17:14:08
阅读次数:
289