Leetcode
文章平均质量分 52
hugoR10K
这个作者很懒,什么都没留下…
展开
-
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 · 318 阅读 · 0 评论 -
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 · 285 阅读 · 0 评论 -
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 · 288 阅读 · 0 评论 -
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 · 375 阅读 · 0 评论 -
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 · 284 阅读 · 0 评论