How Array is differ from LinkedList?

Ayush Said

+0 -0

Storage: Arrays are stored in contiguous memory locations, while linked lists are not stored in contiguous memory locations and have elements stored in separate nodes that are linked together using pointers.
Size: The size of an array is fixed at the time of creation, while linked lists can grow or shrink dynamically as elements are added or removed.
Element Access: Accessing a specific element in an array is done using an index, which takes constant time. In a linked list, access time increases linearly with the number of elements, as each node must be traversed to reach the desired element.

Submit Your Response