← Sliding Window Quiz: all 8 questions
Sliding Window Quiz · Question 8 of 8
What is the length of the shortest subarray of [2, 3, 1, 2, 4, 3] with sum ≥ 7?
What is the length of the shortest subarray of [2, 3, 1, 2, 4, 3] with sum ≥ 7?
Answer & explanation
Correct answer: 2
[4, 3] sums to 7 with length 2. No single element is ≥ 7.
Can you get the rest right without peeking?
Take the timed Sliding Window Quiz quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →