摘要: Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".public class Solution { pub... 阅读全文
posted @ 2015-02-01 15:15 mrpod2g 阅读(95) 评论(0) 推荐(0)
摘要: Evaluate the value of an arithmetic expression inReverse Polish Notation.Valid operators are+,-,*,/. Each operand may be an integer or another express... 阅读全文
posted @ 2015-02-01 15:12 mrpod2g 阅读(121) 评论(0) 推荐(0)
摘要: Given an array and a value, remove all instances of that value in place and return the new length.The order of elements can be changed. It doesn't mat... 阅读全文
posted @ 2015-02-01 15:04 mrpod2g 阅读(96) 评论(0) 推荐(0)
摘要: Given a sorted array, remove the duplicates in place such that each element appear onlyonceand return the new length.Do not allocate extra space for a... 阅读全文
posted @ 2015-02-01 14:46 mrpod2g 阅读(68) 评论(0) 推荐(0)
摘要: Given a string containing just the characters'(',')','{','}','['and']', determine if the input string is valid.The brackets must close in the correct ... 阅读全文
posted @ 2015-02-01 13:08 mrpod2g 阅读(126) 评论(0) 推荐(0)
摘要: Given a linked list, remove thenthnode from the end of list and return its head.For example, Given linked list: 1->2->3->4->5, and n = 2. After re... 阅读全文
posted @ 2015-02-01 11:50 mrpod2g 阅读(105) 评论(0) 推荐(0)