摘要: 题目: Given an input string, reverse the string word by word. For example,Given s = "the sky is blue",return "blue is sky the". Update (2015-02-12):For 阅读全文
posted @ 2017-06-13 20:06 panini 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 题目: Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are +, -, *, /. Each operand may be an integer or anoth 阅读全文
posted @ 2017-06-13 10:35 panini 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 题目: Sort a linked list in O(n log n) time using constant space complexity. 链接: http://leetcode.com/problems/sort-list/ 6/12/2017 10ms, 24%,merge sort, 阅读全文
posted @ 2017-06-13 06:13 panini 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 题目: Sort a linked list using insertion sort. Hide Tags Linked List Sort Sort a linked list using insertion sort. Hide Tags Linked List Sort Sort a lin 阅读全文
posted @ 2017-06-13 03:44 panini 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a singly linked list L: L0→L1→…→Ln-1→Ln,reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→… You must do this in-place without altering the nodes' values. 阅读全文
posted @ 2017-06-13 02:44 panini 阅读(130) 评论(0) 推荐(0) 编辑