leetcode
huangdl007
这个作者很懒,什么都没留下…
展开
-
[leetcode]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-08-13 15:29:15 · 344 阅读 · 0 评论 -
[leetcode]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.解题思路: 递归!solution:/** * Definition for a b原创 2015-08-13 16:46:04 · 222 阅读 · 0 评论 -
[leetcode]Delete Node in a Linked List
Write a function to delete a node (except the tail) in a singly linked list, given only access to that node.Supposed the linked list is 1 -> 2 -> 3 -> 4 and you are given the third node with value 3, t原创 2015-08-13 17:15:46 · 266 阅读 · 0 评论