Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
どちらも O(1) のアクセスの複雑さと O(n) のランダムな挿入/削除の複雑さを持っています。ただし、ベクトルは再割り当てとコピーのために拡張時にコストがかかりますが、deque にはこの問題はありません。
deque の方がパフォーマンスが優れているように見えますが、ほとんどの人が deque の代わりに vector を使用するのはなぜですか?