Skip to content
RED SAGSkills
hard20 pts · first answer countsstacks-and-queues

Shortest subarray with sum at least K

You need the shortest subarray with sum at least K, and the array can contain negative numbers. Why does a plain sliding window fail, and what works?

Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions