Evaluate the value of an arithmetic expression in Reverse Polish Notation.
Valid operators are +, -, *, /.
Each operand may be an integer or another expression.
Some examples:
["2", "1", ...
分类:
其他好文 时间:
2015-01-04 10:10:36
阅读次数:
167
A string is a palindrome if it has exactly the same sequence of characters when traversed left-to-right as right-to-left. For example, the following s...
分类:
其他好文 时间:
2015-01-04 06:23:36
阅读次数:
230
Longest Valid ParenthesesGiven a string containing just the characters'('and')', find the length of the longest valid (well-formed) parentheses substr...
分类:
其他好文 时间:
2015-01-03 22:20:40
阅读次数:
131
这题算是简单,但是还是有错到我都不知道为啥错要启动编译器来调试的时候,原来是不知道有个判断字母的函数是isalnum(),于是自己写了个判断字母的函数,第一次没判断数字,就错了,第二次发现发现判断字母时我是判断A~z则是字母,但是A和a之间隔了32个字符,而大写字母只有26个,说明之间还有不是字母的...
分类:
其他好文 时间:
2015-01-03 19:49:56
阅读次数:
190
Restore IP AddressesGiven a string containing only digits, restore it by returning all possible valid IP address combinations.For example:Given"255255...
分类:
其他好文 时间:
2015-01-03 11:49:35
阅读次数:
178
1.安装samba
$sudo apt-get install samba
2.编辑配置表
$vi /etc/samba/smb.conf 在最后增加以下SECTION:
[ home ]
comment = workplace
browseable = yes
writeable = yes
path = /home/
valid users = smb
3.创建sm...
分类:
系统相关 时间:
2015-01-02 22:29:15
阅读次数:
238
https://oj.leetcode.com/problems/longest-substring-without-repeating-characters/http://fisherlei.blogspot.com/2012/12/leetcode-longest-substring-without.htmlpublicclassSolution{
publicintlengthOfLongestSubstring(Strings){
if(s==null||s.isEmpty())
return0;/..
分类:
其他好文 时间:
2015-01-02 16:16:01
阅读次数:
119
https://oj.leetcode.com/problems/valid-parentheses/http://fisherlei.blogspot.com/2013/01/leetcode-valid-parentheses.htmlpublicclassSolution{
publicbooleanisValid(Strings)
{
if(s==null)
returntrue;
Stack<Character>stack=newStack<>();
for(charc:s..
分类:
其他好文 时间:
2015-01-02 16:12:14
阅读次数:
99
Given a string containing only digits, restore it by returning all possible valid IP address combinations.For example:Given"25525511135",return["255.2...
分类:
其他好文 时间:
2015-01-02 13:24:09
阅读次数:
185
题目:(DP, Backtracing)Given a stringsand a dictionary of wordsdict, add spaces insto construct a sentence where each word is a valid dictionary word.Ret...
分类:
其他好文 时间:
2015-01-02 06:23:46
阅读次数:
122