🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Queues and Deques: all 13 questions

Quiz: Queues and Deques · Question 6 of 13

What does windowmax([4, 2, 12, 3], 2) return?

What does window_max([4, 2, 12, 3], 2) return?

  1. A.[4, 12, 3]
  2. B.[4, 12, 12]
  3. C.[12, 12, 12]
  4. D.[2, 2, 3]
Answer & explanation

Correct answer: [4, 12, 12]

Windows [4, 2], [2, 12], [12, 3] have maxima 4, 12, 12.

Can you get the rest right without peeking?

Take the timed Quiz: Queues and Deques quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →