2015年3月18日

LeetCode-3 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-18 22:27 linxiong1991 阅读(171) 评论(0) 推荐(0) 编辑

LeetCode-85 Maximal Rectangle

摘要: Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area.思路: 如上图所示,我们以i行为底边,比如以第5行为底边,则每... 阅读全文

posted @ 2015-03-18 20:16 linxiong1991 阅读(131) 评论(0) 推荐(0) 编辑

LeetCode-44 Wildcard Matching

摘要: '?' Matches any single character.'*' Matches any sequence of characters (including the empty sequence).The matching should cover the entire input stri... 阅读全文

posted @ 2015-03-18 16:56 linxiong1991 阅读(152) 评论(0) 推荐(0) 编辑

2015年3月17日

LeetCode-84 Largest Rectangle in Histogram

摘要: Givennnon-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the histog... 阅读全文

posted @ 2015-03-17 23:16 linxiong1991 阅读(121) 评论(0) 推荐(0) 编辑

2015年3月16日

LeetCode-123 Best Time to Buy and Sell Stock III

摘要: Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complete a... 阅读全文

posted @ 2015-03-16 00:41 linxiong1991 阅读(115) 评论(0) 推荐(0) 编辑

2015年3月14日

LeetCode-87 Scramble String

摘要: Given a strings1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representation... 阅读全文

posted @ 2015-03-14 22:53 linxiong1991 阅读(160) 评论(0) 推荐(0) 编辑

LeetCode-164 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-14 21:12 linxiong1991 阅读(266) 评论(0) 推荐(0) 编辑

2015年3月13日

LeetCode-45 Jump Game II

摘要: Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximu... 阅读全文

posted @ 2015-03-13 21:23 linxiong1991 阅读(119) 评论(0) 推荐(0) 编辑

2015年3月12日

LeetCode-115 Distinct Subsequences

摘要: Given a stringSand a stringT, count the number of distinct subsequences ofTinS.A subsequence of a string is a new string which is formed from the orig... 阅读全文

posted @ 2015-03-12 23:05 linxiong1991 阅读(102) 评论(0) 推荐(0) 编辑

2015年3月11日

LeetCode-95 Unique Binary Search Trees II

摘要: Givenn, generate all structurally uniqueBST's(binary search trees) that store values 1...n.For example,Givenn= 3, your program should return all 5 uni... 阅读全文

posted @ 2015-03-11 22:23 linxiong1991 阅读(100) 评论(0) 推荐(0) 编辑

导航