if(file!=null){try{InputStreamin=newFileInputStream(file);Longsize=Long.parseLong(in.available()+"");StringrealName=file.getName();Stringimg=(realName.substring(realName.lastIndexOf(".")+1,realName.length())).toLowerCase();Stringdir=ServletActionContext.get..
分类:
编程语言 时间:
2015-06-01 20:57:12
阅读次数:
139
题目:Given a strings, partitionssuch that every substring of the partition is a palindrome.Return the minimum cuts needed for a palindrome partitioning ...
分类:
其他好文 时间:
2015-06-01 20:16:51
阅读次数:
103
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-01 20:08:32
阅读次数:
138
string CommonPrefix(string str1,string str2){ int len_1=str1.length(); int len_2=str2.length(); int min_len=len_1>len_2 ? len_2:len_1; str...
分类:
其他好文 时间:
2015-06-01 13:09:54
阅读次数:
92
Longest Consecutive SequenceGiven an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given[100, 4...
分类:
编程语言 时间:
2015-05-31 18:11:52
阅读次数:
128
Longest Common Prefix
题目:
Write a function to find the longest common prefix string amongst an array of strings. 题意:
找出所有字符串的最长的公共前缀 思路:先找到最短的一个字符串,然后它的长度当作范围,接着判断所有字符串的同一个下标的字符,若全部相等则添加到返回字符...
分类:
其他好文 时间:
2015-05-31 14:06:39
阅读次数:
148
The following iterative sequence is defined for the set of positive integers:
n → n/2 (n is
even)
n → 3n + 1 (n is
odd)
Using the rule above and starting with 13, we generate the following sequ...
分类:
其他好文 时间:
2015-05-31 09:27:37
阅读次数:
117
Given an unsorted array of integers, find the length of the longest consecutive elements sequence. For example,Given [100, 4, 200, 1, 3, 2],The longes...
分类:
编程语言 时间:
2015-05-30 22:24:35
阅读次数:
172
题目:Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters...
分类:
其他好文 时间:
2015-05-30 16:35:41
阅读次数:
96
LeetCode -- Longest Substring Without Repeating Characters...
分类:
其他好文 时间:
2015-05-29 18:05:31
阅读次数:
124