Prepare
Practice
Interview
Aptitude
Reasoning
English
GD
Placement papers
HR
Current affairs
Engineering
MCA
MBA
Online test
Login
Online Practice Test
>
Data Structure
« Previous
Next »
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
« Previous
Next »
Write your comments
*
*
Email must be in the form someone@domain.com
*
*
Enter the code shown above:
Please enter the code shown above
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)
Related Content
C test (42)
C (12)
C++ for beginners (10)
C++ (20)
C++ (24)
C++ (18)
C++ (14)
C++ (12)
C++ (15)
C++ (15)
Data structure (20)
Data structure (10)
Data structure (10)
Data structure (10)
PERL (25)
VC++ (11)
Oops (30)
Mainframe (41)
Mainframe (15)
Embedded systems (15)
OOAD (49)
Advertisement
▲