All challenges
Multiple ChoiceIntermediate 30s

list vs deque

Choose the best answer for: list vs deque prepend
Options
  1. 1deque has O(1) left append; list.pop(0) is O(n)
  2. 2They are identical for prepends in every case
  3. 3deque is slower for all operations than a plain list
  4. 4list has O(1) prepend because it shifts no elements

Think you can answer under pressure?

Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.

Play this in a 3-minute battle