862.shortest-subarray-with-sum-at-least-k.pdf
68.9 KB
leetcode.cn 2022-10-26
🔴862.shortest-subarray-with-sum-at-least-k
🏷️ Tags
#queue #array #binary_search #prefix_sum #sliding_window #monotonic_queue #heap_priority_queue
🔴862.shortest-subarray-with-sum-at-least-k
🏷️ Tags
#queue #array #binary_search #prefix_sum #sliding_window #monotonic_queue #heap_priority_queue
1687.delivering-boxes-from-storage-to-ports.pdf
113.3 KB
leetcode.cn 2022-12-05
🔴1687.delivering-boxes-from-storage-to-ports
🏷️ Tags
#segment_tree #queue #array #dynamic_programming #monotonic_queue #heap_priority_queue
🔴1687.delivering-boxes-from-storage-to-ports
🏷️ Tags
#segment_tree #queue #array #dynamic_programming #monotonic_queue #heap_priority_queue
918.maximum-sum-circular-subarray.pdf
77 KB
leetcode.com 2023-01-18
🟡918.maximum-sum-circular-subarray
🏷️ Tags
#array #divide_and_conquer #dynamic_programming #queue #monotonic_queue
🟡918.maximum-sum-circular-subarray
🏷️ Tags
#array #divide_and_conquer #dynamic_programming #queue #monotonic_queue
2444.count-subarrays-with-fixed-bounds.pdf
77.3 KB
leetcode.com 2023-03-04
🔴2444.count-subarrays-with-fixed-bounds
🏷️ Tags
#array #queue #sliding_window #monotonic_queue
🔴2444.count-subarrays-with-fixed-bounds
🏷️ Tags
#array #queue #sliding_window #monotonic_queue
2444.count-subarrays-with-fixed-bounds.pdf
77.3 KB
leetcode.com 2023-03-04
🔴2444.count-subarrays-with-fixed-bounds
🏷️ Tags
#array #queue #sliding_window #monotonic_queue
🔴2444.count-subarrays-with-fixed-bounds
🏷️ Tags
#array #queue #sliding_window #monotonic_queue
leetcode.cn 2023-07-20
🟡918.maximum-sum-circular-subarray
🏷️ Tags
#queue #array #divide_and_conquer #dynamic_programming #monotonic_queue
🟡918.maximum-sum-circular-subarray
🏷️ Tags
#queue #array #divide_and_conquer #dynamic_programming #monotonic_queue
Telegraph
maximum-sum-circular-subarray
给定一个长度为 n 的环形整数数组 nums ,返回 nums 的非空 子数组 的最大可能和 。 环形数组 意味着数组的末端将会与开头相连呈环状。形式上, nums[i] 的下一个元素是 nums[(i + 1) % n] , nums[i] 的前一个元素是 nums[(i - 1 + n) % n] 。 子数组 最多只能包含固定缓冲区 nums 中的每个元素一次。形式上,对于子数组 nums[i], nums[i + 1], ..., nums[j] ,不存在 i <= k1, k2 <= j 其中 k1…
leetcode.cn 2023-07-21
🔴1499.max-value-of-equation
🏷️ Tags
#queue #array #sliding_window #monotonic_queue #heap_priority_queue
🔴1499.max-value-of-equation
🏷️ Tags
#queue #array #sliding_window #monotonic_queue #heap_priority_queue
Telegraph
max-value-of-equation
给你一个数组 points 和一个整数 k 。数组中每个元素都表示二维平面上的点的坐标,并按照横坐标 x 的值从小到大排序。也就是说 points[i] = [xi, yi] ,并且在 1 <= i < j <= points.length 的前提下, xi < xj 总成立。 请你找出 yi + yj + |xi - xj| 的 最大值,其中 |xi - xj| <= k 且 1 <= i < j <= points.length。 题目测试数据保证至少存在一对能够满足 |xi - xj| <= k 的点。…
leetcode.com 2023-08-16
🔴239.sliding-window-maximum
🏷️ Tags
#queue #array #sliding_window #monotonic_queue #heap_priority_queue
🔴239.sliding-window-maximum
🏷️ Tags
#queue #array #sliding_window #monotonic_queue #heap_priority_queue
Telegraph
sliding-window-maximum
You are given an array of integers nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers in the window. Each time the sliding window moves right by one position. Return…
leetcode.com 2023-10-21
🔴1425.constrained-subsequence-sum
🏷️ Tags
#queue #array #dynamic_programming #sliding_window #monotonic_queue #heap_priority_queue
🔴1425.constrained-subsequence-sum
🏷️ Tags
#queue #array #dynamic_programming #sliding_window #monotonic_queue #heap_priority_queue
Telegraph
constrained-subsequence-sum
Given an integer array nums and an integer k, return the maximum sum of a non-empty subsequence of that array such that for every two consecutive integers in the subsequence, nums[i] and nums[j], where i < j, the condition j - i <= k is satisfied. A subsequence…
leetcode.cn 2024-02-05
🟡1696.jump-game-vi
🏷️ Tags
#queue #array #dynamic_programming #monotonic_queue #heap_priority_queue
🟡1696.jump-game-vi
🏷️ Tags
#queue #array #dynamic_programming #monotonic_queue #heap_priority_queue
Telegraph
jump-game-vi
给你一个下标从 0 开始的整数数组 nums 和一个整数 k 。 一开始你在下标 0 处。每一步,你最多可以往前跳 k 步,但你不能跳出数组的边界。也就是说,你可以从下标 i 跳到 [i + 1, min(n - 1, i + k)] 包含 两个端点的任意位置。 你的目标是到达数组最后一个位置(下标为 n - 1 ),你的 得分 为经过的所有数字之和。 请你返回你能得到的 最大得分 。 示例 1: 输入:nums = [1,-1,-2,4,-7,3], k = 2 输出:7 解释:你可以选择子序列 [1…