Your limit has been exceed. We have implemented this system because, We got difficulty on managing our servers. Please donate some amount to remove this limit.
Quota: 0 / 30Donate
A linked list is a linear data structure, in which the elements are not stored at contiguous memory locations. The elements in a linked list are linked using pointers as shown in the below image:
In simple words, a linked list consists of nodes where each node contains a data field and a reference(link) to the next node in the list.
The difference between linked list and array are
|BASIS FOR COMPARISON||ARRAY||LINKED LIST|
|Basic||It is a consistent set of a fixed number of data items.||It is an ordered set comprising a variable number of data items.|
|Size||Specified during declaration.||No need to specify; grow and shrink during execution.|
|Storage Allocation||Element location is allocated during compile time.||Element position is assigned during run time.|
|Order of the elements||Stored consecutively||Stored randomly|
|Accessing the element||Direct or randomly accessed, i.e., Specify the array index or subscript.||Sequentially accessed, i.e., Traverse starting from the first node in the list by the pointer.|
|Insertion and deletion of element||Slow relatively as shifting is required.||Easier, fast and efficient.|
|Searching||Binary search and linear search||linear search|
Click here to submit your answer.