Can linked list be implemented using arrays?

Options
- Yes
- No


CORRECT ANSWER : Yes

Discussion Board
Answer is YES

Yes we can implement it by creating a sruct...

struct Node{
int data;
int arrayIndexOfNextNode;
}

and after that just create array of objects of struct Node...
Some immediate disadvantages:

You''ll have dead space in the array (entries which aren''t currently used for items) taking up memory...
You''ll have to keep track of the free entries - after a few insertions and deletions, these free entries could be anywhere...
Using an array will impose an upper limit on the size of the linked list...

Ashish 07-5-2017 04:28 PM

Data Structure - Linked List

Yes, linked lists can be implemented using arrays. Array of linked list is an important data structure used in many applications. It is an interesting structure to form a useful data structure. It combines static and dynamic structure. Static means array and dynamic means linked list, used to form a useful data structure. This array of linked list structure is appropriate for applications.

Prajakta Pandit 01-30-2017 11:40 PM

array as linked list

the whole concept of a linked list is an independent set of nodes pointing, each one pointing to the next until the end.
An array is a contiguous memory block.

Steven 05-20-2016 06:43 PM

Wrong answer

No the linked list can not be implemented using arrays as ecah and every node should get non contigous memory which will be pointed by link part of node but array will allocate them contigeous me,ory locations. so linked list can not be implemented using arrays.

Manish 03-12-2015 05:20 AM

Write your comments


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement