- 博客(7)
- 收藏
- 关注
原创 Binary Tree Postorder Traversal
Given a binary tree, return the postorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3return [3,2,1].
2014-07-04 01:54:20 250
原创 Binary Tree Preorder Traversal
Given a binary tree, return the preorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3return [1,2,3].
2014-07-03 10:56:26 246
原创 LRU Cache
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set.get(key) - Get the value (will always be positive) of the key if
2014-07-03 10:52:29 301
原创 Sort List
Sort a linked list in O(n log n) time using constant space complexity.The tricky point of this problem is that these number stored in an li
2014-05-31 12:23:19 360
原创 Evaluate Reverse Polish Notation
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", "+
2014-05-29 12:49:36 378
原创 Reverse Words in a String
Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".
2014-05-29 12:03:34 509
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人