![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
LeetCode OJ
黑黑的小白羊
这个作者很懒,什么都没留下…
展开
-
Maximum Depth of Binary Tree
Maximum Depth of Binary Tree Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node原创 2014-09-27 22:48:41 · 369 阅读 · 0 评论 -
Reverse Integer
public class Solution { public int reverse(int x) { if (x == Integer.MIN_VALUE) return Integer.MIN_VALUE; int result = 0; int num = Math.abs(x); while原创 2014-09-28 00:17:46 · 368 阅读 · 0 评论 -
Same Tree
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原创 2014-09-27 23:10:25 · 266 阅读 · 0 评论 -
Single Number
Single Number Total Accepted: 37050 Total Submissions: 80614My SubmissionsGiven an array of integers, every element appears twice except for one. Find that single one.Note:Your alg原创 2014-09-27 22:15:19 · 335 阅读 · 0 评论 -
Best Time to Buy and Sell Stock
Best Time to Buy and Sell Stock Say you have an array for which the ith element is the price of a given stock on day i.If you were only permitted to complete at most one transaction (i原创 2014-10-02 20:22:54 · 367 阅读 · 0 评论