1. 题目:Longest Substring Without Repeating CharactersGiven a string, find the length of the longest substring without repeating characters. For example...
分类:
其他好文 时间:
2015-06-08 21:19:56
阅读次数:
106
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. For “...
分类:
其他好文 时间:
2015-06-08 17:32:43
阅读次数:
136
Description
You are given a number of case-sensitive strings of alphabetic characters, find the largest string X, such that either X, or its inverse can be found as a substring of any of the given ...
分类:
编程语言 时间:
2015-06-08 15:03:25
阅读次数:
125
首先要明白,java只用的wrapper类型都是不可变的,什么是不可变类型呢?顾名思义,就是这种类型的对象一旦创建好之后,无论调用何种方法都无法改变该对象的任何的属性。String 源码中,它的所有属性都是private final的,因此,只有在构造string对象的时候,这些属性才是可以修改的,string类的方法中需要返回一个string的,如subString,concat等方法,都会先构...
分类:
编程语言 时间:
2015-06-08 13:29:38
阅读次数:
240
1.字符串的扩展与修复语言脚本都对字符串特别关注,有关的方法特别多,这些方法有三大类:第一类:与标签无关的实现:charAt,charCodeAt,concat,lastIndexOf,localeCompare,match,replace,slice,split,substr,substring,...
分类:
编程语言 时间:
2015-06-08 01:02:19
阅读次数:
162
Description
A substring of a string T is defined as:
T(i, k)=TiTi+1...Ti+k-1, 1≤i≤i+k-1≤|T|.
Given two strings A, B and one integer K, we define S, a set of triples (i, j, k):
S = {(i, j, ...
分类:
编程语言 时间:
2015-06-07 23:41:18
阅读次数:
391
Well, there many ways to solve this problem. Let's first look at a naive solution.The basic idea is simple. Starting from the first character of the s...
分类:
其他好文 时间:
2015-06-07 21:31:03
阅读次数:
128
String to Integer (atoi)
Implement atoi to convert a string to an integer.
Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask you...
分类:
编程语言 时间:
2015-06-07 06:15:52
阅读次数:
181
Given a string s, partition s such that every substring of the partition is a palindrome.Return all possible palindrome partitioning of s.For example,...
分类:
其他好文 时间:
2015-06-06 21:57:41
阅读次数:
122
写该系列文章的目的是记录Guava源码中个人感觉不错且值得借鉴的内容。
一、MoreObjects类
//MoreObjects.ToStringHelper类的toString()方法:对于字符串拼接的写法蛮不错的,此前本人一直用比较挫的方式:不管三七二一,先拼接然后再subString()
@Override public String toString() {
/...
分类:
其他好文 时间:
2015-06-06 20:46:37
阅读次数:
311