![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
leetcode前缀和
Bryan要加油
这个作者很懒,什么都没留下…
展开
-
1109. Corporate Flight Bookings[Medium](Leetcode每日一题-2021.08.31)
Problem原创 2021-09-01 20:28:58 · 349 阅读 · 0 评论 -
528. Random Pick with Weight[Medium](Leetcode每日一题-2021.08.30)
Problem原创 2021-09-01 20:28:05 · 236 阅读 · 0 评论 -
1588. Sum of All Odd Length Subarrays[Easy](Leetcode每日一题-2021.08.29)
Problem原创 2021-09-01 20:26:59 · 217 阅读 · 0 评论 -
1480. Running Sum of 1d Array[Easy](Leetcode每日一题-2021.08.28)
Problem原创 2021-09-01 20:25:50 · 296 阅读 · 0 评论 -
930. Binary Subarrays With Sum[Medium](Leetcode每日一题-2021.07.08)
ProblemGiven a binary array nums and an integer goal, return the number of non-empty subarrays with a sum goal.A subarray is a contiguous part of the array.Constraints:1 <= nums.length <= 3 * 104nums[i] is either 0 or 1.0 <= goal <= nums原创 2021-07-08 08:40:20 · 251 阅读 · 0 评论 -
525. Contiguous Array[Medium](Leetcode每日一题-2021.06.03)--抄
ProblemGiven a binary array nums, return the maximum length of a contiguous subarray with an equal number of 0 and 1.Constraints:1 <= nums.length <= 105nums[i] is either 0 or 1.Example1Input: nums = [0,1]Output: 2Explanation: [0, 1] is the原创 2021-06-04 08:30:50 · 468 阅读 · 0 评论 -
523. Continuous Subarray Sum(Leetcode每日一题-2021.06.02)
Problem原创 2021-06-02 08:49:04 · 339 阅读 · 0 评论 -
1744. Can You Eat Your Favorite Candy on Your Favorite Day?[Medium](Leetcode每日一题-2021.06.01)--抄答案
Problem原创 2021-06-02 08:48:02 · 380 阅读 · 0 评论 -
1074. Number of Submatrices That Sum to Target[Hard]-210529
ProblemGiven a matrix and a target, return the number of non-empty submatrices that sum to target.A submatrix x1, y1, x2, y2 is the set of all cells matrix[x][y] with x1 <= x <= x2 and y1 <= y <= y2.Two submatrices (x1, y1, x2, y2) and (x1’,原创 2021-05-30 11:36:32 · 460 阅读 · 0 评论 -
1738. Find Kth Largest XOR Coordinate Value[Medium](Leetcode每日一题-2021.05.19)
ProblemYou are given a 2D matrix of size m x n, consisting of non-negative integers. You are also given an integer k.The value of coordinate (a, b) of the matrix is the XOR of all matrix[i][j] where 0 <= i <= a < m and 0 <= j <= b < n (原创 2021-05-19 08:33:08 · 537 阅读 · 0 评论 -
1442. Count Triplets That Can Form Two Arrays of Equal XOR[Medium](Leetcode每日一题-2021.05.18)
ProblemGiven an array of integers arr.We want to select three indices i, j and k where (0 <= i < j <= k < arr.length).Let’s define a and b as follows:a = arr[i] ^ arr[i + 1] ^ … ^ arr[j - 1]b = arr[j] ^ arr[j + 1] ^ … ^ arr[k]Note that ^原创 2021-05-18 22:17:29 · 351 阅读 · 0 评论 -
1310. XOR Queries of a Subarray[Medium](Leetcode每日一题-2021.05.12)
ProblemGiven the array arr of positive integers and the array queries where queries[i] = [Li, Ri], for each query i compute the XOR of elements from Li to Ri (that is, arr[Li] xor arr[Li+1] xor … xor arr[Ri] ). Return an array containing the result for th原创 2021-05-12 08:54:27 · 516 阅读 · 0 评论 -
363. Max Sum of Rectangle No Larger Than K(Leetcode每日一题-2021.04.22)--抄答案
ProblemGiven an m x n matrix matrix and an integer k, return the max sum of a rectangle in the matrix such that its sum is no larger than k.It is guaranteed that there will be a rectangle with a sum no larger than k.Constraints:m == matrix.lengthn ==原创 2021-04-22 08:36:31 · 181 阅读 · 0 评论 -
304. Range Sum Query 2D - Immutable(Leetcode每日一题-2021.03.02)
ProblemGiven a 2D matrix matrix, find the sum of the elements inside the rectangle defined by its upper left corner (row1, col1) and lower right corner (row2, col2).Note:You may assume that the matrix does not change.There are many calls to sumRegion原创 2021-03-02 19:27:41 · 54 阅读 · 0 评论 -
303. Range Sum Query - Immutable(Leetcode每日一题-2021.03.01)
ProblemGiven an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive.Implement the NumArray class:NumArray(int[] nums) Initializes the object with the integer array nums.int sumRange(int i, int j) Return the sum原创 2021-03-01 19:04:18 · 106 阅读 · 0 评论 -
724. Find Pivot Index(Leetcode每日一题-2021.01.28)
ProblemGiven an array of integers nums, write a method that returns the “pivot” index of this array.We define the pivot index as the index where the sum of all the numbers to the left of the index is equal to the sum of all the numbers to the right of th原创 2021-01-28 20:57:37 · 166 阅读 · 0 评论 -
1248. Count Number of Nice Subarrays(Leetcode每日一题-2020.04.21)
占坑原创 2020-04-21 19:10:42 · 212 阅读 · 0 评论 -
974. Subarray Sums Divisible by K(Leetcode每日一题-2020.05.27)
ProblemGiven an array A of integers, return the number of (contiguous, non-empty) subarrays that have a sum divisible by K.ExampleInput: A = [4,5,0,-2,-3,1], K = 5Output: 7Explanation: There are 7 subarrays with a sum divisible by K = 5:[4, 5, 0, -2原创 2020-05-27 21:30:52 · 284 阅读 · 0 评论 -
1371. Find the Longest Substring Containing Vowels in Even Counts(Leetcode每日一题-2020.05.20)
ProblemGiven the string s, return the size of the longest substring containing each vowel an even number of times. That is, ‘a’, ‘e’, ‘i’, ‘o’, and ‘u’ must appear an even number of times.Example1Input: s = “eleetminicoworoep”Output: 13Explanation: T原创 2020-05-20 21:05:12 · 251 阅读 · 0 评论 -
560. Subarray Sum Equals K(Leetcode每日一题-2020.05.15)
ProblemGiven an array of integers and an integer k, you need to find the total number of continuous subarrays whose sum equals to k.ExampleInput:nums = [1,1,1], k = 2Output: 2ConstraintsThe length of the array is in range [1, 20,000].The range of原创 2020-05-15 20:24:07 · 241 阅读 · 0 评论