title: Why prefer std::vector over std::deque?
body: <p>They both have access complexity of O(1) and random insertion/removal complexity of O(n). But vector costs more when expanding because of reallocation and copy, while deque does not have this issue.</p>
  
  <p>It seems deque has a better performance, but why most people use vector instead of deque?</p>