Pergunta de entrevista da empresa Tata Consultancy Services

Explain the difference between an array and a linked list, and where each should be used.

Resposta da entrevista

Sigiloso

26 de jan. de 2026

I explained that arrays store elements in contiguous memory locations and allow fast access using indexes, while linked lists store elements in nodes with pointers to the next node. I mentioned that arrays are better for quick access, whereas linked lists are better when frequent insertions and deletions are required.