2015年3月23日

Balanced Binary Tree

摘要: Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tree in which the depth... 阅读全文

posted @ 2015-03-23 15:22 绿树荫 阅读(127) 评论(0) 推荐(0) 编辑

2015年3月21日

Maximum Gap

摘要: Given an unsorted array, find the maximum difference between the successive elements in its sorted form.Try to solve it in linear time/space.Return 0 ... 阅读全文

posted @ 2015-03-21 12:07 绿树荫 阅读(145) 评论(0) 推荐(0) 编辑

Remove Duplicates from Sorted List II

摘要: Given a sorted linked list, delete all nodes that have duplicate numbers, leaving onlydistinctnumbers from the original list.For example,Given1->2->3-... 阅读全文

posted @ 2015-03-21 09:33 绿树荫 阅读(114) 评论(0) 推荐(0) 编辑

2015年3月20日

Palindrome Number

摘要: Determine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Some hints:Could negative integers be palindromes? (i... 阅读全文

posted @ 2015-03-20 10:36 绿树荫 阅读(123) 评论(0) 推荐(0) 编辑

Longest Substring Without Repeating Characters

摘要: Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo... 阅读全文

posted @ 2015-03-20 08:48 绿树荫 阅读(112) 评论(0) 推荐(0) 编辑

2015年3月19日

Longest Consecutive Sequence

摘要: Given an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given[100, 4, 200, 1, 3, 2],The longest ... 阅读全文

posted @ 2015-03-19 16:03 绿树荫 阅读(145) 评论(0) 推荐(0) 编辑

导航