Problem Description:Given a strings, partitionssuch that every substring of the partition is a palindrome.Return all possible palindrome partitioning ...
分类:
其他好文 时间:
2014-07-07 16:02:55
阅读次数:
259
Problem Description:Given an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given[100, 4, 200, 1...
分类:
其他好文 时间:
2014-07-07 15:54:24
阅读次数:
193
Given a string containing just the characters'('and')', find the length of the longest valid (well-formed) parentheses substring.For"(()", the longest...
分类:
其他好文 时间:
2014-07-07 15:34:56
阅读次数:
160
1. 最笨的办法.......function get() { var s = 22.127456 + ""; var str = s.substring(0,s.indexOf(".") + 3); alert(str); }2. 正则 效果不错3. 他就比较聪明了.....4.会用新鲜东西的.....
分类:
Web程序 时间:
2014-07-03 10:39:46
阅读次数:
205
String的常用方法方法说明Anchor()创建html锚Concat()把字符串连接起来indexOf()查找字符出现的位置lastIndexOf()查找最后出现字符charAt()返回指定位置的字符Substring()截取字符串...
分类:
其他好文 时间:
2014-07-02 00:49:45
阅读次数:
315
substr 方法返回一个从指定位置开始的指定长度的子字符串。stringvar.substr(start [, length ])参数stringvar必选项。要提取子字符串的字符串文字或 String 对象。start必选项。所需的子字符串的起始位置。字符串中的第一个字符的索引为 0。lengt...
分类:
Web程序 时间:
2014-07-01 16:20:58
阅读次数:
253
Given a string containing just the characters '(' and ')',
find the
length of the longest valid (well-formed) parentheses substring.For "(()",
the
longest valid parentheses substring is "()...
分类:
其他好文 时间:
2014-07-01 09:09:06
阅读次数:
156
Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longest pa...
分类:
其他好文 时间:
2014-06-30 22:43:45
阅读次数:
294
题目
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 longest consecutive elements sequence...
分类:
其他好文 时间:
2014-06-29 22:16:48
阅读次数:
239
题目
Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).
For example,
S = "ADOBECODEBANC"
T = "ABC"
Minimum wi...