Always Beginner
Tuesday, June 3, 2014
LeetCode: 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 sk...
LeetCode: Evaluate Reverse Polish Notation
›
Evaluate the value of an arithmetic expression in Reverse Polish Notation . Valid operators are + , - , * , / . Each operand may be an i...
LeetCode: Max Points on a Line
›
Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. We can have statistic about the slope...
LeetCode: Sort List
›
Sort a linked list in O(n log n) time using constant space complexity. We can use merge sort to sort linked list. Split the list into sin...
LeetCode: Insertion Sort List
›
Sort a linked list using insertion sort. Just do it like sorting an array. And for linked list, it is easier to move nodes. Split the link...
Monday, June 2, 2014
LeetCode: LRU Cache
›
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set . ge...
LeetCode: 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 \ ...
›
Home
View web version