|
1
10
你考虑过使用
|
|
|
2
1
是的,它叫std::vector。现在是O(1)时间,它几乎总是比std::list快。(是的,而且内存效率也很高) std::list最重要的特性是从中间执行常量时间删除/插入。如果您不需要它,请选择std::vector。 |