Given a stringsconsists of upper/lower-case alphabets and empty space characters' ', return the length of last word in the string.If the last word doe...
分类:
其他好文 时间:
2014-07-16 21:00:49
阅读次数:
208
Implement wildcard pattern matching with support for '?' and '*'.'?' Matches any single character.'*' Matches any sequence of characters (including th...
分类:
其他好文 时间:
2014-07-11 19:36:48
阅读次数:
202
Like a string, a list is a sequence of values. In a string, the values are characters; in a list, they can be any type. The values in list are called ...
分类:
其他好文 时间:
2014-07-11 09:01:06
阅读次数:
242
The syntax for accessing the elements of a list is the same as for accessing the characters of a string – the bracket operator ([ ]). The expression i...
分类:
其他好文 时间:
2014-07-11 08:55:10
阅读次数:
174
Implement wildcard pattern matching with support for '?' and '*'.
'?' Matches any single character.
'*' Matches any sequence of characters (including the empty sequence).
The matching should cover t...
分类:
其他好文 时间:
2014-07-10 21:21:42
阅读次数:
255
看下面的英文解释:const char* c_str ( ) const;Get C string equivalentGenerates a null-terminated sequence of characters (c-string) with the same content as the...
分类:
编程语言 时间:
2014-07-09 20:40:50
阅读次数:
345
原文:js 正则之 控制字符 \cX前些天在司徒正美的群里有人问了这么个问题:正则表达式里特殊字符 \cX 到底是什么?确实,我之前也挺在意的,但是一直没去看到底是什么。在MDN上只说是控制字符(详情请查阅 Using Special Characters),但是什么是控制字符呢?在阮一峰的《Jav...
分类:
Web程序 时间:
2014-07-09 16:15:14
阅读次数:
196
For each prefix of a given string S with N characters (each character has an ASCII code between 97 and 126, inclusive), we want to know whether the prefix is a periodic string. That is, for each i (2...
分类:
其他好文 时间:
2014-07-08 17:54:12
阅读次数:
297
SPOJ Problem Set (classical)
1812. Longest Common Substring II
Problem code: LCS2
A string is finite sequence of characters over a non-empty finite set Σ.
In this problem, Σ is...
分类:
其他好文 时间:
2014-07-08 17:14:39
阅读次数:
291
字典树
看题库上说这是字典树,不过被我水过去了。
题意是说用对应的字典,翻译出火星文。
each line will contain at most 3000 characters.
看到这句话我就安心了。Time Limit: 10000/5000 MS (Java/Others)
果断用map 来水了。还真AC了。3296MS 。本来是想巩固一下字典树的,不过……。
...
分类:
其他好文 时间:
2014-07-08 14:42:44
阅读次数:
173