- 博客(7)
- 收藏
- 关注
原创 Leetcode Oj 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",
2015-02-05 16:15:34
292
原创 leetcode Bit Manipulation
Bit Manipulation, work from latchedSingle Number IGiven an array of integers, every element appears twice except for one. Find that single one.Note:Your algorithm should have a linear ru
2015-01-31 11:30:58
384
原创 Leetcode OJ Remove Duplicates from Sorted Array
Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.Do not allocate extra space for another array, you must do this in place with
2015-01-31 10:23:48
295
转载 转:自学算法之路
转载于 http://blog.sina.com.cn/lvyimeng 我的一篇算法学习札记,思路有点乱,不断更新中,同时载于人人网现在真的在自学算法,努力按照以下阶段复习中,争取做到倒背如流首先,先介绍两本算法书:1.,这本是算法最 经典教材,几乎所有学习算法都用的这本书。2.因为本人极度喜欢Perl,所以推荐这本书,内容也不错,但联系到Pe
2015-01-27 13:36:30
611
转载 Traverse Tree iteratively
Inorder Tree Traversal without recursion and without stack!Using Morris Traversal, we can traverse the tree without using stack and recursion. The idea of Morris Traversal is based on Thread
2015-01-27 12:27:58
340
原创 Leetcode Oj Reverse Integer
Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321Level : easyclass Solution {public: int reverse(int x) { int sign = 1;; if(x
2015-01-26 16:21:55
327
原创 leetcode oj Symmetric Tree
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center)/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * Tr
2015-01-26 16:13:29
291
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人