leetcode
文章平均质量分 79
leeeziming
这个作者很懒,什么都没留下…
展开
-
Reverse words in a string
决定刷leetcode了,最近正在学python,所以打算用python刷。当然啊原创 2014-08-30 14:59:03 · 258 阅读 · 0 评论 -
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",原创 2014-08-30 23:13:39 · 214 阅读 · 0 评论 -
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 solutio原创 2014-08-31 23:48:09 · 188 阅读 · 0 评论 -
Binary Tree Preorder 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 solution原创 2014-08-31 23:53:40 · 226 阅读 · 0 评论 -
Single Number
题目描述:Given an array of integers, every element appears twice except for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you implement it without us原创 2014-09-02 22:17:13 · 190 阅读 · 0 评论 -
Same Tree
题目描述:Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical and the nodes have the same value.思原创 2014-09-04 00:01:48 · 222 阅读 · 0 评论 -
Symmetric Tree
题目描述:Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: 1 / \ 2 2 / \ / \3 4 4 3But the原创 2014-09-04 23:33:01 · 229 阅读 · 0 评论