Dsa
Sliding Window
Easy
Min Subarray Length for Target
Given an array of integers and a target integer, return the minimal length of a contiguous subarray of which the sum is at least the target. If there is no such subarray, return 0.
Key concepts
sliding_windowprefix_summinimum_subarray
Practise this out loud — free
Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.
🎙 Practise this question now