leetcode
寸人
成也己,败也己。
展开
-
(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 \ 2 / 3return [3,2,1]. Note: Recursive s原创 2014-08-19 11:34:19 · 301 阅读 · 0 评论 -
(leetcode)Evaluate Reverse Polish Notation
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 expressio原创 2014-08-18 15:28:44 · 410 阅读 · 0 评论 -
(Leetcode)Reverse Words in a String
Reverse Words in a String原创 2014-08-18 15:04:36 · 345 阅读 · 0 评论 -
(leetcode)Reorder List
题目描述: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.For example,Given {1,2,3,4}, reorder i原创 2014-08-19 16:28:53 · 262 阅读 · 0 评论 -
(leetcode)Distinct Subsequences
问题描述:Given a string S and a string T, count the number of distinct subsequences ofT in S. A subsequence of a string is a new string which is formed from the original string by deleting some (can原创 2014-08-26 10:44:29 · 291 阅读 · 0 评论 -
Word Break II
题目描述:Given a string s and a dictionary of words dict, add spaces ins to construct a sentence where each word is a valid dictionary word. Return all such possible sentences. For example, given原创 2014-08-20 10:22:53 · 539 阅读 · 0 评论 -
(leetcode)Word Break
Word Break原创 2014-08-19 22:12:00 · 388 阅读 · 0 评论 -
(leetcode)Linked List Cycle II
Linked List Cycle II原创 2014-08-19 22:00:51 · 233 阅读 · 0 评论 -
(leetcode)Linked List Cycle
Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?原创 2014-08-19 21:54:12 · 244 阅读 · 0 评论 -
(leetcode)Binary Tree Preorder Traversal
Binary Tree Preorder Traversal原创 2014-08-19 15:23:47 · 237 阅读 · 0 评论 -
(leetcode)Insertion Sort List
Insertion Sort List原创 2014-08-19 11:20:26 · 322 阅读 · 0 评论 -
(leetcode)Sort List
题目描述:Sort a linked list in O(n log n) time using constant space complexity原创 2014-08-18 20:54:16 · 246 阅读 · 0 评论 -
(leetcode)Max Points on a Line
Max Points on a Line原创 2014-08-18 20:33:30 · 316 阅读 · 0 评论