Pregunta de entrevista de Lockheed Martin

What is the difference between a vector and a linked list?

Respuesta de la entrevista

Anónimo

10 jul 2015

Vectors are another name for dynamic arrays. Good for random read access and for inserting and deleting from the tail of the vector. However, they are inefficient for insertion and deletion from the head to the tail-1. Linked lists are efficient for inserting and deleting from any position of the collection.