← Sliding Window Quiz: all 8 questions
Sliding Window Quiz · Question 3 of 8
What is the maximum sum of 3 consecutive elements in [2, 1, 5, 1, 3, 2]?
What is the maximum sum of 3 consecutive elements in [2, 1, 5, 1, 3, 2]?
Answer & explanation
Correct answer: 9
Windows: 2+1+5=8, 1+5+1=7, 5+1+3=9, 1+3+2=6. The best is 9.
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 →