This site features a collection of common technical interview questions gathered by a group of programmers who have been through, and given, lots of technical interviews. There is an emphasis on C++ and game programming technical interviews, but most of the questions are relevant to any technical interview.
Clash of the Titans: Linked List vs. Array

Describe an advantage for a linked list over an array and vise-versa.


1 Comment so far
Leave a comment

***LL overr Array***
–> ADVANTAGE
a]As Linked list(dynamic) allocates memory as per requirement, hence it saves memory in both cases 1: if LL is empty no mem. is allocated.
2: if LL has some data, mem. is restricted to data itself.
b]LL can be easily manipulated and can be easily diverted to various other data Structures like trees,stacks,queues,etc.

–>DISADVANTAGE

a]As LL uses addresses for linking adjasant nodes, needs extra mem. than actual data to store addresses.
b]As uses addresses,needs pointers,difficult to handle pointers.



Leave a comment
If you are including code in your comment, place it within a <div class='code'></div> tag for better formatting.


Do you have a technical interview question you would like to submit? Some tips you would like to pass on? Just want to say hi? Feel free to contact us