相信大家经常看到对比一些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
# 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
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 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
Problem:Given a string containing just the characters'(',')','{','}','['and']', determine if the input string is valid.The brackets must close in the ...
分类:
其他好文 时间:
2014-10-19 01:16:41
阅读次数:
293
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example, "race a car"isnota palindro....
分类:
其他好文 时间:
2014-10-17 06:26:33
阅读次数:
239
[leetcode]
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 "bbbbb" the longest substring is "b", with th...
分类:
其他好文 时间:
2014-10-15 11:42:20
阅读次数:
224
[leetcode]Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string....
分类:
其他好文 时间:
2014-10-15 11:06:50
阅读次数:
205