Dynamic Programming21 sections · 916 units
Open in Course

Quiz: Shortest Subarray

Knowledge check

Check Your Understanding

In Shortest Subarray with Sum >= K, why do we need a monotonic deque instead of sliding window?

  1. A.Because window size k is variable
  2. B.Because we need both min and max
  3. C.Because we need minimum length, not maximum
  4. D.Because array contains negative numbers, so prefix sum is not monotonic
Start the roadmap to answer the quizzes and solve the challenges