Domanda di colloquio di Amazon

What is the difference between an array and a linked list? When might you use either data structure?

Risposta di colloquio

Anonimo

1 feb 2012

Well, generally on the C/C++ side, linked list allocates memory dynamically, array is static. Leading to the result which to expend/copy a array is a very expensive operation.

1