随笔分类 -  stack

[leecode]Evaluate Reverse Polish Notation
摘要:Evaluate Reverse Polish NotationEvaluate the value of an arithmetic expression inReverse Polish Notation.Valid operators are+,-,*,/. Each operand may ... 阅读全文

posted @ 2014-08-05 10:28 喵星人与汪星人 阅读(113) 评论(0) 推荐(0) 编辑

[leetcode]Simplify Path
摘要:Simplify PathGiven an absolute path for a file (Unix-style), simplify it.For example,path="/home/", =>"/home"path="/a/./b/../../c/", =>"/c"click to sh... 阅读全文

posted @ 2014-07-24 22:03 喵星人与汪星人 阅读(235) 评论(0) 推荐(1) 编辑

[leetcode]Valid Parentheses
摘要:Valid ParenthesesGiven a string containing just the characters'(',')','{','}','['and']', determine if the input string is valid.The brackets must clos... 阅读全文

posted @ 2014-07-24 16:00 喵星人与汪星人 阅读(148) 评论(0) 推荐(0) 编辑

[leetcode]Reverse Words in a String
摘要:Reverse Words in a StringGiven an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".click... 阅读全文

posted @ 2014-07-24 00:26 喵星人与汪星人 阅读(160) 评论(0) 推荐(0) 编辑