- 博客(8)
- 资源 (8)
- 收藏
- 关注
原创 给定一个无序整形数组,找出其中所以三个数之和为0的所有组合
/** * @author Liudong * @time 09/26/2014 * @function 3Sum * * title: * Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? * Find all unique triplets in t
2014-09-27 13:12:24 2566
转载 java中5种字符串拼接方法
import org.apache.commons.lang.StringUtils;public class CutString { //性能最差 public String testPlus() { String s = ""; for (int i = 0; i < 10000; i++) {
2014-09-25 16:18:22 912
原创 一个有意思的算法,Container With Most Water
题目:Title: Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate(i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai
2014-09-25 15:34:14 351
原创 判断一个整数是否回文整数,不用辅助数组!
题目: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 integer to
2014-09-24 15:27:25 597
转载 JAVA中int、string、char[]以及char之间的转换
JAVA中int、String的类型转换 (2007-11-20 15:26:35)转载▼标签: 学习公社 类型转换分类: JAVA int -> Stringint i=12345;String s="";第一种方法:s=i+"";第二种方法:s=Str
2014-09-21 20:07:59 520
原创 Longest Substring Without Repeating Characters,最长无重复字符子串
要求:Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the length is 3.
2014-09-19 15:31:46 459
转载 最长回文子串 Manacher算法--O(n)回文子串算法
O(n)回文子串算法注:转载的这篇文章,我发现下面那个源代码有点bug。。。在下一篇博客中改正了。。 这里,我介绍一下O(n)回文串处理的一种方法。Manacher算法.原文地址:http://zhuhongcheng.wordpress.com/2009/08/02/a-simple-linear-time-algorithm-for-finding-lo
2014-09-05 16:36:08 401
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人