1、注意空字符串的处理;2、注意是alphanumeric字符;3、字符串添加字符直接用+就可以; 1 class Solution: 2 # @param s, a string 3 # @return a boolean 4 def isPalindrome(self, ...
分类:
其他好文 时间:
2014-10-17 01:34:53
阅读次数:
216
串口测试时,用到串口,把打印机的拔下来,换上测试的,程序一打开就提示错误:the given port name does not start with COM/com or does not resolve to a valid serial port.(给定的端口名称未以 COM/com 开头或...
分类:
其他好文 时间:
2014-10-16 19:32:52
阅读次数:
1119
目前还未解决,先记录一下。Text Edit*** Settings ***Library Selenium2Librarybaidu_xpath open browser http://10.11.20.117:9500/poc/ ie sleep 3 maximize browser windo...
分类:
其他好文 时间:
2014-10-16 13:02:42
阅读次数:
934
在Win7,32位上安装MySQL5.6.21时出现日期/时间格式错误, 如下图所示:错误描述为: String was not recognized as a valid DateTime.下面是解决办法: 参考: http://stackoverflow.com/questions/263...
分类:
数据库 时间:
2014-10-15 19:52:41
阅读次数:
206
Validate if a given string is numeric.
Some examples:
"0" => true
" 0.1 " => true
"abc" => false
"1 a" => false
"2e10" => true
Note: It is intended for the problem statement to be ambiguo...
分类:
其他好文 时间:
2014-10-15 11:19:20
阅读次数:
173
Forms 为了让form以及控件、ngModel富有样式,可以增加以下class: 通过在元素上添加repuired ?angularjs自动更具状态切换这些class ng-valid (验证成功) ng-invalid (验证失败) ng-pristine(从未输入过) ng-...
分类:
Web程序 时间:
2014-10-15 09:00:20
阅读次数:
225
这题折腾主要是因为对于这个anagram的定义理解有误,参看维基页面:Ananagramis a type ofword play, the result of rearranging the letters of a word or phrase to produce a new word or ...
分类:
其他好文 时间:
2014-10-14 21:30:09
阅读次数:
195
Valid Palindrome
Total Accepted: 22728 Total
Submissions: 99271My Submissions
Question
Solution
Given a string, determine if it is a palindrome, considering only alphanumeric char...
分类:
其他好文 时间:
2014-10-14 18:21:29
阅读次数:
218
1 class Solution { 2 public: 3 bool isPalindrome(string s) { 4 int strLen = s.size(); 5 int pos_h = 0; 6 int pos_t = 0; 7...
分类:
其他好文 时间:
2014-10-14 17:21:39
阅读次数:
129
Evaluate the value of an arithmetic expression in Reverse Polish Notation.Valid operators are +, -, *, /. Each operand may be an integer or another ex...
分类:
其他好文 时间:
2014-10-14 09:49:07
阅读次数:
219