题目意思非常简单,判断所给字符串中的括号是否匹配,需要注意的问题:)(这样是不匹配的。 public class Solution { public boolean isValid(String s) { Stack stack = new Stack(); ...
分类:
其他好文 时间:
2015-04-02 22:07:35
阅读次数:
146
Given a string containing just the characters '(', ')', '{', '}', '[' and ']',
determine if the input string is valid.
The brackets must close in the correct order, "()" and "()[]{}" are
all vali...
分类:
其他好文 时间:
2015-04-02 21:00:04
阅读次数:
105
problem:
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 state...
分类:
其他好文 时间:
2015-04-02 18:52:48
阅读次数:
116
1 bool isPalindrome(string s) { 2 int start=0, end=s.length()-1; 3 while(start<end) { 4 if (!isalnum(s[start])) start++; 5 el...
分类:
其他好文 时间:
2015-04-02 18:38:44
阅读次数:
125
今天遇到这个错误,android.content.res.Resources$NotFoundException: Resource ID #0x7f05003e type #0x12 is not valid我在R文件中找到了这个这个ID的源 原来是一个布局文件,我给他定义了ID直接进行引用(很蠢...
分类:
移动开发 时间:
2015-04-02 13:17:43
阅读次数:
178
在tomcat7下停止应用时报错: created a ThreadLocal with key of type [com.opensymphony.xwork2.inject.ContainerImpl$10]
INFO: A valid shutdown command was received via the shutdown port. Stopping the Server ins...
分类:
其他好文 时间:
2015-04-02 11:42:13
阅读次数:
216
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
三个功能:1.查人品,回复RP名字,如RP张三 2.笑话,则回复笑话+日期,如:笑话20140319 3.看天气,回复城市名称,如TQ北京什么也不说,只上代码,index.phpresponseMsg();}else{ $wechatObj->valid();}class wechatCall...
分类:
微信 时间:
2015-04-02 01:07:44
阅读次数:
258