Pergunta de entrevista da empresa Tata Consultancy Services

They asked me to explain the concept of Data Structures, specifically the difference between an array and a linked list, and where each one should be used.

Resposta da entrevista

Sigiloso

16 de jan. de 2026

I explained that an array stores elements in contiguous memory locations and allows fast access using index values, while a linked list stores elements in non-contiguous memory using pointers. However, I got confused while explaining time complexity and real-life use cases, and I couldn’t clearly justify when a linked list is better than an array, which likely led to my rejection.