Give the advantages & disadvantages of the basic sequence container... 1.vector , 2.list. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Give the advantages & disadvantages of the basic sequence container... 1.vector , 2.list.

Related with oop

20th Nov 2017, 9:10 AM
Chetana Rajendra Sonawane
Chetana Rajendra Sonawane - avatar
3 Answers
0
Vector allows for random access, while list does not. Vector is very CPU cache friendly since it's contiguous, and thus has better performance when iterating it, while a list will result in many cache misses. List has the advantage of much faster insertions when adding new elements.
20th Nov 2017, 11:25 AM
aklex
aklex - avatar
0
Thanks aklex
20th Nov 2017, 2:47 PM
Chetana Rajendra Sonawane
Chetana Rajendra Sonawane - avatar
0
Thanx aklex
12th Dec 2018, 9:35 AM
Harshada mane
Harshada mane - avatar