相信大家经常看到对比一些PHP应用中,说用isset() 替换 strlen(),isset比strlen执行速度快等。例子:if ( isset($username[5]) ) {// The username is at least six characters long.}原因是isset是语...
分类:
编程语言 时间:
2014-10-21 19:10:29
阅读次数:
239
[leetcode]Given a binary tree, determine if it is a valid binary search tree (BST)....
分类:
其他好文 时间:
2014-10-21 12:20:55
阅读次数:
176
# A comment, this is so you can read your program later.# Anything after the # is ignored by python.print "I could have code like this." # and the com...
分类:
其他好文 时间:
2014-10-21 10:14:12
阅读次数:
137
题目:Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters...
分类:
其他好文 时间:
2014-10-20 21:11:05
阅读次数:
203
Word Break IIGiven a string s and a dictionary of words dict, add spaces in s toconstruct a sentence where each word is a valid dictionaryword.Return ...
分类:
其他好文 时间:
2014-10-20 17:10:28
阅读次数:
466
Period
Time Limit: 3000MS
Memory Limit: 30000K
Total Submissions: 13511
Accepted: 6368
Description
For each prefix of a given string S with N characters (each character...
分类:
其他好文 时间:
2014-10-19 21:30:13
阅读次数:
233
题目:给两个字符串S和T,判断T在S中出现的次数。
A subsequence of a string is a new string which is formed from the original string by deleting some (can be none) of the characters without disturbing the relative positions of the remaining characters. (ie, "ACE" is a subsequence...
分类:
其他好文 时间:
2014-10-19 17:09:51
阅读次数:
190
Given a stringsand a dictionary of wordsdict, add spaces insto construct a sentence where each word is a valid dictionary word.Return all such possibl...
分类:
编程语言 时间:
2014-10-19 11:30:36
阅读次数:
213
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example,"A man, a plan, a canal: Pana...
分类:
其他好文 时间:
2014-10-19 04:49:48
阅读次数:
165