LeetCode104:Maximum Depth of Binary TreeGiven a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path fr...
分类:
其他好文 时间:
2015-04-04 11:52:56
阅读次数:
93
var?s?=?"hello?world!";????????????
var?word?=?s.substring(s.indexOf("?")+1,s.length); 字符串既然不是对象,为什么它会有属性呢?只要引用了字符串s的属性,javascript就会将字符串值通...
分类:
编程语言 时间:
2015-04-03 22:35:36
阅读次数:
224
ZigZag Conversion
The string "PAYPALISHIRING" is written in a zigzag pattern on a given number
of rows like this: (you may want to display this pattern in a fixed font for better legibility)
...
分类:
其他好文 时间:
2015-04-03 17:31:12
阅读次数:
160
Longest Palindromic Substring问题:Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and th...
分类:
其他好文 时间:
2015-04-03 17:06:38
阅读次数:
112
Given a string containing just the characters'('and')', find the length of the longest valid (well-formed) parentheses substring.For"(()", the longest...
分类:
其他好文 时间:
2015-04-03 11:10:45
阅读次数:
102
LeetCode #Longest Substring Without Repeating Characters#
折腾了一回,第一感觉就是没有感觉...这种没技巧的话暴力是不现实的..而后发现其实没有很好理解题目的意
思考过么?究竟什么是最长的子字符串
这里有个很要命的概念, 子字符串,别小看这家伙.是搞定题目的关键.
"abcduiwe" 这...
分类:
其他好文 时间:
2015-04-03 00:18:57
阅读次数:
115
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 "()",
...
分类:
其他好文 时间:
2015-04-02 11:40:03
阅读次数:
114
substring(int beginIndex, int endIndex)方法在JDK6和JDK7中是不同的。了解他们的区别可以让我们更好的使用这个方法。方便起见,以下用substring() 代替 substring(int beginIndex, int endIndex)。1. subst...
分类:
其他好文 时间:
2015-04-02 06:34:30
阅读次数:
121
You’ve got string s, consisting of small English letters. Some of the English letters are good, the rest are bad.A substring s[l…r] (1?≤?l?≤?r?≤?|s|) of string s??=??s1s2…s|s| (where |s| is the length...
分类:
其他好文 时间:
2015-04-01 22:07:34
阅读次数:
221