
连续
文章平均质量分 75
jmspan
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
LeetCode 325. Maximum Size Subarray Sum Equals k(和为k的最长子数组)
原题网址:https://leetcode.com/problems/maximum-size-subarray-sum-equals-k/ Given an array nums and a target value k, find the maximum length of a subarray that sums to k. If there isn't one, return 0原创 2016-04-26 06:10:18 · 2487 阅读 · 0 评论 -
LeetCode 340. Longest Substring with At Most K Distinct Characters(最长字串)
原题网址:https://leetcode.com/problems/longest-substring-with-at-most-k-distinct-characters/ Given a string, find the length of the longest substring T that contains at most k distinct characters.原创 2016-04-30 09:10:31 · 1361 阅读 · 0 评论 -
LeetCode 309. Best Time to Buy and Sell Stock with Cooldown(股票交易)
原题网址:https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-cooldown/ Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to原创 2016-04-20 13:34:58 · 683 阅读 · 0 评论 -
LeetCode 253. Meeting Rooms II(会议室)
原题网址:https://leetcode.com/problems/meeting-rooms-ii/ Given an array of meeting time intervals consisting of start and end times [[s1,e1],[s2,e2],...] (si < ei), find the minimum number of confe原创 2016-04-08 09:05:35 · 8199 阅读 · 0 评论 -
LeetCode 57. Insert Interval(插入区间)
原题网址:https://leetcode.com/problems/insert-interval/ Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary). You may assume that the intervals w原创 2016-05-21 07:40:48 · 523 阅读 · 0 评论 -
LeetCode 56. Merge Intervals(合并区间)
原题网址:https://leetcode.com/problems/merge-intervals/ Given a collection of intervals, merge all overlapping intervals. For example, Given [1,3],[2,6],[8,10],[15,18], return [1,6],[8,10],[15,1原创 2016-05-21 07:14:22 · 686 阅读 · 0 评论 -
LeetCode 53. Maximum Subarray(最大子数组)
原题网址:https://leetcode.com/problems/maximum-subarray/ Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array [−2,1原创 2016-05-21 06:53:56 · 1353 阅读 · 0 评论 -
LeetCode 228. Summary Ranges(归纳区间)
原题网址:https://leetcode.com/problems/summary-ranges/ Given a sorted integer array without duplicates, return the summary of its ranges. For example, given [0,1,2,4,5,7], return ["0->2","4->5","7原创 2016-04-05 05:02:40 · 841 阅读 · 0 评论 -
LeetCode 200. Number of Islands(小岛)
https://leetcode.com/problems/number-of-islands/ Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting原创 2016-05-04 04:23:07 · 1902 阅读 · 0 评论 -
LeetCode 128. Longest Consecutive Sequence(最长连续序列)
原题网址:https://leetcode.com/problems/longest-consecutive-sequence/ Given an unsorted array of integers, find the length of the longest consecutive elements sequence. For example, Given [100, 4,原创 2016-05-27 00:26:15 · 882 阅读 · 0 评论 -
LeetCode 304. Range Sum Query 2D - Immutable(矩阵求和)
原题网址:https://leetcode.com/problems/range-sum-query-2d-immutable/ Given a 2D matrix matrix, find the sum of the elements inside the rectangle defined by its upper left corner (row1, col1) and lowe原创 2016-04-19 07:45:22 · 779 阅读 · 0 评论 -
LeetCode 303. Range Sum Query - Immutable(数组求和)
原题网址:https://leetcode.com/problems/range-sum-query-immutable/ Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive. Example: Given nums = [-2原创 2016-04-19 07:21:12 · 646 阅读 · 0 评论 -
LeetCode 302. Smallest Rectangle Enclosing Black Pixels(最小面积矩形)
原题网址:https://leetcode.com/problems/smallest-rectangle-enclosing-black-pixels/ An image is represented by a binary matrix with 0 as a white pixel and 1 as a black pixel. The black pixels are con原创 2016-04-19 07:06:47 · 1712 阅读 · 0 评论 -
LeetCode 298. Binary Tree Longest Consecutive Sequence(二叉树最长连续序列)
原题网址:https://leetcode.com/problems/binary-tree-longest-consecutive-sequence/ Given a binary tree, find the length of the longest consecutive sequence path. The path refers to any sequence原创 2016-04-17 00:08:30 · 1343 阅读 · 0 评论 -
LeetCode 159. Longest Substring with At Most Two Distinct Characters(最长字串)
原题网址:https://leetcode.com/problems/longest-substring-with-at-most-two-distinct-characters/ Given a string, find the length of the longest substring T that contains at most 2 distinct characters.原创 2016-05-26 00:54:39 · 614 阅读 · 0 评论 -
LeetCode 330. Patching Array(数组补丁)
原题网址:https://leetcode.com/problems/patching-array/ Given a sorted positive integer array nums and an integer n, add/patch elements to the array such that any number in range [1, n] inclusive ca原创 2016-04-28 06:24:51 · 616 阅读 · 0 评论