![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Array
文章平均质量分 59
郝春雨
大数据开发萌新,吉他入门小渣渣,吃货并一直努力地减肥着,永远怀着一颗成为大神的心,希望在智能的这几年不虚度~~~
展开
-
【LeetCode】330.Patching Array(Hard)解题报告
【LeetCode】330.Patching Array(Hard)解题报告题目地址:https://leetcode.com/problems/patching-array/description/ 题目描述: Given a sorted positive integer array nums and an integer n, add/patch elements to t...原创 2018-03-06 09:07:35 · 181 阅读 · 0 评论 -
【LeetCode】274.H-Index(Medium)解题报告
【LeetCode】274.H-Index(Medium)解题报告题目地址:https://leetcode.com/problems/h-index/description/ 题目描述: Given an array of citations (each citation is a non-negative integer) of a researcher, write a f...原创 2018-02-20 23:53:34 · 200 阅读 · 0 评论 -
【LeetCode】163.Missing Ranges(Medium)(带锁题)解题报告
【LeetCode】163.Missing Ranges(Medium)(带锁题)解题报告题目地址:https://leetcode.com/problems/missing-ranges/(带锁题) 题目描述: Given a sorted integer array where the range of elements are [lower, upper] inclusiv...原创 2018-02-20 23:10:21 · 310 阅读 · 0 评论 -
【LeetCode】128.Longest Consecutive Sequence(Hard)解题报告
【LeetCode】128.Longest Consecutive Sequence(Hard)解题报告题目地址:https://leetcode.com/problems/longest-consecutive-sequence/description/ 题目描述: Given an unsorted array of integers, find the length of ...原创 2018-02-20 20:01:52 · 220 阅读 · 0 评论 -
【LeetCode】169. Majority Element(Easy)解题报告
【LeetCode】169. Majority Element(Easy)解题报告 题目地址:https://leetcode.com/problems/majority-element/#/description 题目描述: Given an array of size n, find the majority element. The majority element is t...原创 2017-06-03 18:31:25 · 185 阅读 · 0 评论 -
【LeetCode】189.Rotate Array(Easy)解题报告
【LeetCode】189.Rotate Array(Easy)解题报告题目地址:https://leetcode.com/problems/rotate-array/description/ 题目描述: Rotate an array of n elements to the right by k steps. For example, with n = 7 an...原创 2018-02-20 18:55:50 · 136 阅读 · 0 评论 -
【LeetCode】11.Container With Most Water(Medium)解题报告
【LeetCode】11.Container With Most Water(Medium)解题报告题目地址:https://leetcode.com/problems/container-with-most-water/description/ 题目描述: Given n non-negative integers a1, a2, …, an, where each repre...原创 2017-11-27 21:49:26 · 131 阅读 · 0 评论 -
【LeetCode】41. First Missing Positive(Hard)解题报告
【LeetCode】41. First Missing Positive(Hard)解题报告题目地址:https://leetcode.com/problems/first-missing-positive/description/ 题目描述: Given an unsorted integer array, find the first missing positive int...原创 2017-11-23 09:09:27 · 127 阅读 · 0 评论 -
【LeetCode】277.Find the Celebrity(Medium)解题报告(带锁题)
【LeetCode】277.Find the Celebrity(Medium)解题报告(带锁题)题目地址:https://leetcode.com/problems/find-the-celebrity/(带锁题) 题目描述: Suppose you are at a party with n people (labeled from 0 to n - 1) and among...原创 2018-02-20 17:42:11 · 405 阅读 · 1 评论 -
【LeetCode】123.Best Time to Buy and Sell Stock III(Hard)解题报告
【LeetCode】123.Best Time to Buy and Sell Stock III(Hard)解题报告题目地址:https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iii/description/ 题目描述: Say you have an array for which the ith element原创 2018-02-20 17:28:49 · 276 阅读 · 0 评论 -
【LeetCode】309.Best Time to Buy and Sell Stock with Cooldown(Medium)解题报告
【LeetCode】309.Best Time to Buy and Sell Stock with Cooldown(Medium)解题报告题目地址:https://leetcode.com/problems/best-time-to-buy-and-sell-stock-with-cooldown/description/ 题目描述: Say you have an array for原创 2018-02-20 15:07:44 · 252 阅读 · 0 评论 -
【LeetCode】370.Range Addition(Medium)解题报告
【LeetCode】370.Range Addition(Medium)解题报告题目地址:https://leetcode.com/problems/range-addition/(带锁题) 题目描述: Assume you have an array of length n initialized with all 0’s and are given k update oper...原创 2018-02-20 13:44:25 · 238 阅读 · 0 评论 -
【LeetCode】57.Insert Interval(Medium)解题报告
【LeetCode】57.Insert Interval(Medium)解题报告题目地址:https://leetcode.com/problems/merge-intervals/description/ 题目描述: Given a set of non-overlapping intervals, insert a new interval into the interval...原创 2018-02-19 22:32:22 · 140 阅读 · 0 评论 -
【LeetCode】324.Wiggle Sort II(Medium)解题报告
【LeetCode】324.Wiggle Sort II(Medium)解题报告题目地址:https://leetcode.com/problems/wiggle-sort-ii/description/ 题目描述: Given an unsorted array nums, reorder it such that nums[0] < nums[1] > nums[...原创 2018-03-08 15:07:48 · 195 阅读 · 0 评论 -
【LeetCode】327. Count of Range Sum(Hard)解题报告
【LeetCode】327. Count of Range Sum(Hard)解题报告题目地址:https://leetcode.com/problems/count-of-range-sum/description/ 题目描述: Given an integer array nums, return the number of range sums that lie in [l...原创 2018-03-08 15:07:04 · 349 阅读 · 0 评论 -
【LeetCode】275.H-Index II(Medium)解题报告
【LeetCode】275.H-Index II(Medium)解题报告题目地址:https://leetcode.com/problems/h-index-ii/description/ 题目描述: Follow up for H-Index: What if the citations array is sorted in ascending order? Could you...原创 2018-02-21 07:56:09 · 190 阅读 · 0 评论 -
【LeetCode】448.Find All Numbers Disappeared in an Array(Easy)解题报告
【LeetCode】448.Find All Numbers Disappeared in an Array(Easy)解题报告tags: Array 题目地址:https://leetcode.com/problems/find-all-numbers-disappeared-in-an-array/#/description 题目描述: Given an array of...原创 2017-06-02 21:00:26 · 245 阅读 · 0 评论 -
【LeetCode】447.Number of Boomerangs(Easy)解题报告
【LeetCode】447.Number of Boomerangs(Easy)解题报告题目地址:https://leetcode.com/problems/number-of-boomerangs/description/ 题目描述: Given n points in the plane that are all pairwise distinct, a “boomerang...原创 2018-02-21 08:44:16 · 132 阅读 · 0 评论 -
【LeetCode】406.Queue Reconstruction by Height(Medium)解题报告
【LeetCode】406.Queue Reconstruction by Height(Medium)解题报告题目地址:https://leetcode.com/problems/queue-reconstruction-by-height/description/ 题目描述: Suppose you have a random list of people standing ...原创 2018-03-06 08:36:12 · 276 阅读 · 0 评论 -
【LeetCode】80.Remove Duplicates from Sorted Array II(Medium)解题报告
【LeetCode】80.Remove Duplicates from Sorted Array II(Medium)解题报告题目地址:https://leetcode.com/problems/remove-duplicates-from-sorted-array-ii/description/ 题目描述: Follow up for “Remove Duplicates”: ...原创 2018-03-05 21:06:08 · 112 阅读 · 0 评论 -
LeetCode】66.Plus One(easy)解题报告
【LeetCode】66.Plus One(easy)解题报告题目地址:https://leetcode.com/problems/plus-one/description/ 题目描述: Given a non-negative integer represented as a non-empty array of digits, plus one to the integer....原创 2018-03-05 20:45:46 · 114 阅读 · 0 评论 -
【LeetCode】287.Find the Duplicate Number解题报告
【LeetCode】287.Find the Duplicate Number解题报告tags: Array 题目地址:https://leetcode.com/problems/find-the-duplicate-number/#/description题目描述: Given an array nums containing n + 1 integers ...原创 2017-06-07 22:41:54 · 432 阅读 · 0 评论 -
【LeetCode】289.Game of Life(Medium)解题报告
【LeetCode】289.Game of Life(Medium)解题报告题目地址:https://leetcode.com/problems/game-of-life/description/ 题目描述: According to the Wikipedia’s article: “The Game of Life, also known simply as Life, is...原创 2018-03-02 16:21:30 · 253 阅读 · 0 评论 -
【LeetCode】164.Maximum Gap(Hard)解题报告
【LeetCode】164.Maximum Gap(Hard)解题报告题目地址:https://leetcode.com/problems/maximum-gap/description/ 题目描述: Given an unsorted array, find the maximum difference between the successive elements in its sor原创 2018-03-02 15:12:14 · 395 阅读 · 0 评论 -
【LeetCode】75.Sort Colors(Medium)解题报告
【LeetCode】75.Sort Colors(Medium)解题报告题目地址:https://leetcode.com/problems/sort-colors/description/ 题目描述: Given an array with n objects colored red, white or blue, sort them so that objects of th...原创 2018-02-23 22:21:41 · 222 阅读 · 0 评论 -
【LeetCode】4.Median of Two Sorted Arrays(Hard)解题报告
【LeetCode】4.Median of Two Sorted Arrays(Hard)解题报告题目地址:https://leetcode.com/problems/median-of-two-sorted-arrays/description/ 题目描述: There are two sorted arrays nums1 and nums2 of size m and n ...原创 2018-02-22 20:33:25 · 199 阅读 · 0 评论 -
【LeetCode】485.Max Consecutive Ones解题报告
【LeetCode】485.Max Consecutive Ones解题报告tags: Array 题目地址:https://leetcode.com/problems/max-consecutive-ones/#/description 题目描述: Given a binary array, find the maximum number of consecutive 1s...原创 2017-05-25 20:51:27 · 406 阅读 · 0 评论 -
【LeetCode】334.Increasing Triplet Subsequence(Medium)解题报告
【LeetCode】334.Increasing Triplet Subsequence(Medium)解题报告题目地址:https://leetcode.com/problems/increasing-triplet-subsequence/description/ 题目描述: Given an unsorted array return whether an increasi...原创 2018-02-22 19:19:06 · 120 阅读 · 0 评论 -
【LeetCode】413.Arithmetic Slices(Medium)解题报告
【LeetCode】413.Arithmetic Slices(Medium)解题报告题目地址:https://leetcode.com/problems/arithmetic-slices/description/ 题目描述: A sequence of number is called arithmetic if it consists of at least three e...原创 2018-02-22 13:59:24 · 266 阅读 · 0 评论 -
【LeetCode】435.Non-overlapping Intervals(Medium)解题报告
【LeetCode】435.Non-overlapping Intervals(Medium)解题报告题目地址:https://leetcode.com/problems/non-overlapping-intervals/description/ 题目描述: Given a collection of intervals, find the minimum number of ...原创 2018-02-22 13:42:52 · 223 阅读 · 0 评论 -
【LeetCode】229.Majority Element II(Medium)解题报告
【LeetCode】229.Majority Element II(Medium)解题报告题目地址:https://leetcode.com/problems/majority-element-ii/#/description 题目描述: Given an integer array of size n, find all elements that appear more th...原创 2017-06-04 16:41:26 · 444 阅读 · 0 评论 -
【LeetCode】455.Assign Cookies(Easy)解题报告
【LeetCode】455.Assign Cookies(Easy)解题报告题目地址:https://leetcode.com/problems/assign-cookies/description/ 题目描述: Assume you are an awesome parent and want to give your children some cookies. But, y...原创 2018-02-21 08:56:26 · 188 阅读 · 0 评论 -
【LeetCode】321.Create Maximum Number(Hard)解题报告
【LeetCode】321.Create Maximum Number(Hard)解题报告题目地址:https://leetcode.com/problems/create-maximum-number/description/ 题目描述: Given two arrays of length m and n with digits 0-9 representing two nu...原创 2018-03-08 15:06:24 · 614 阅读 · 0 评论 -
【LeetCode】373.Find K Pairs with Smallest Sums(Medium)解题报告
【LeetCode】373.Find K Pairs with Smallest Sums(Medium)解题报告题目地址:https://leetcode.com/problems/find-k-pairs-with-smallest-sums/description/ 题目描述: You are given two integer arrays nums1 and nums2...原创 2018-03-08 15:05:36 · 205 阅读 · 0 评论 -
【LeetCode】628.Maximum Product of Three Numbers(Easy)解题报告
【LeetCode】628.Maximum Product of Three Numbers(Easy)解题报告题目地址:https://leetcode.com/problems/maximum-product-of-three-numbers/description/ 题目描述: Given an integer array, find three numbers whose...原创 2018-02-11 23:03:03 · 218 阅读 · 0 评论 -
【LeetCode】442.Find All Duplicates in an Array解题报告
【LeetCode】442.Find All Duplicates in an Array解题报告题目地址:https://leetcode.com/problems/find-all-duplicates-in-an-array/#/description 题目描述: Given an array of integers, 1 ≤ a[i] ≤ n (n = size of a...原创 2018-02-11 22:20:30 · 190 阅读 · 0 评论 -
【LeetCode】122.Best Time to Buy and Sell Stock II(Easy)解题报告
【LeetCode】122.Best Time to Buy and Sell Stock II(Easy)解题报告题目地址:https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii/description/ 题目描述: Say you have an array for which the ith elem原创 2018-01-30 16:46:58 · 286 阅读 · 0 评论 -
【LeetCode】121.Best Time to Buy and Sell Stock(Easy)解题报告
【LeetCode】121.Best Time to Buy and Sell Stock(Easy)解题报告题目地址:https://leetcode.com/problems/best-time-to-buy-and-sell-stock/description/ 题目描述: Say you have an array for which the ith element is the原创 2018-01-30 16:45:21 · 115 阅读 · 0 评论 -
【LeetCode】45.Jump Game II(Hard)解题报告
【LeetCode】45.Jump Game II(Hard)解题报告题目地址:https://leetcode.com/problems/jump-game/description/ 题目描述: Given an array of non-negative integers, you are initially positioned at the first index of原创 2018-01-31 11:18:02 · 147 阅读 · 0 评论 -
【LeetCode】55.Jump Game(Medium)解题报告
【LeetCode】55.Jump Game(Medium)解题报告题目地址:https://leetcode.com/problems/jump-game/description/ 题目描述: Given an array of non-negative integers, you are initially positioned at the first index of t原创 2018-01-31 11:15:40 · 174 阅读 · 0 评论