
leetcode
a819721810
这个作者很懒,什么都没留下…
展开
-
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 using extra原创 2015-05-13 19:22:45 · 484 阅读 · 0 评论 -
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./** * Definition for binary tree * stru原创 2015-05-13 19:32:36 · 761 阅读 · 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./** * Definition原创 2015-05-13 19:45:19 · 562 阅读 · 0 评论 -
Two Sum
Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two numbers such that they add up to the target, where in原创 2015-05-14 05:04:01 · 518 阅读 · 0 评论