Difference between Array and Linked list
Difference between Array and Linked List ================================================================================= Array : Arrays store elements in contiguous memory locations, resulting in easily calculable addresses for the elements stored and this allows faster access to an element at a specific index. Linked List : Linked lists are less rigid in their storage structure and elements are usually not stored in contiguous locations, hence they need to be stored with additional tags giving a reference to the next element. This difference in the data storage scheme decides which data structure would be more suitable for a given situation. ARRAY LINKED LIST Array cannot grow or shrink dynamically. (realloc() is not efficient) Linked List can grow or shrink dynamically. Array has contiguous memory. Hence random access is possible. Notes are not in contiguous memory. Hence only sequential access is allowed.