LeetCode Longest Consecutive Sequence DescriptionGiven 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 consecutive elements sequence is [1, 7月 23 2015 #leetcode
LeetCode Search A 2D Matrix 2 DescriptionWrite an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are sorted in ascending from left to right.Integers 7月 23 2015 #leetcode
LeetCode Add Binary DescriptionGiven two binary strings, return their sum (also a binary string). For example,a = “11”b = “1”Return “100”. The original problem is here. The original code is here. 7月 22 2015 #leetcode
LeetCode Decode Ways DescriptionA message containing letters from A-Z is being encoded to numbers using the following mapping: 'A' -> 1 'B' -> 2 ... 'Z' -> 26 Given an encoded message con 7月 22 2015 #leetcode
LeetCode Median of Two Sorted Arrays DescriptionThere are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)). The original prob 7月 22 2015 #leetcode
LeetCode Search For A Range DescriptionGiven a sorted array of integers, find the starting and ending position of a given target value. Your algorithm’s runtime complexity must be in the order of O(log n). If the target is not f 7月 21 2015 #leetcode
LeetCode Partition List DescriptionGiven a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should preserve the original relative order of the nodes in 7月 21 2015 #leetcode
LeetCode Triangle DescriptionGiven a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below. For example, given the following triangle [ [2], [3,4], 7月 21 2015 #leetcode
LeetCode Trapping Rain Water DescriptionGiven n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining. For example,Given [0,1,0,2,1,0,1,3,2,1 7月 21 2015 #leetcode
LeetCode Spiral Matrix 2 DescriptionGiven an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order. For example,Given n = 3, You should return the following matrix: [ [ 1, 2, 3 ], [ 7月 21 2015 #leetcode