Lockheed Martin Interview Question

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

Interview Answer

Anonymous

Jul 10, 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.