0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

difference > vector<T> / list<T>

Last updated at Posted at 2015-08-05

vectorとlistの使い分け。

以下がわかりやすかった。

SO: vectorとlistをどのように使い分けますか

大抵のケースでは vector 利用で十分かと思います。(Tは要素の型)
...
list の方が好ましいのは、下記条件を満たすときくらいです。
...

  • 中間位置に対する要素の挿入/削除が頻繁に行われ、
  • コンテナに格納される要素数が非常に多く、
  • 要素型のサイズ(sizeof T)が十分大きいとき。
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?