
单调队列
永远的EMT
每天时刻保持超越自我的意识
展开
-
【LeetCode】862. Shortest Subarray with Sum at Least K
Return the length of the shortest, non-empty, contiguous subarray of A with sum at least K.If there is no non-empty subarray with sum at least K, return -1. Example 1:Input: A = [1], K = 1Ou...原创 2019-06-30 23:57:03 · 202 阅读 · 0 评论 -
【LeetCode】239. Sliding Window Maximum
Given an array 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 ...原创 2019-07-01 01:00:58 · 147 阅读 · 0 评论