answersLogoWhite

0


Best Answer

An array is a list of objects.

A linked list is made up of nodes each containing a value then the pointer to the next node.

Linked list example
Node 1:
dog,
continued in node 4

Node 2:
undefined

Node 3:
mouse,
end of list

Node 4:
cat,
continued in node 3

Array example:
dog,
cat,
mouse,
pony,
horse

User Avatar

Wiki User

14y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

13y ago

Array is a simple sequence of numbers which are not concerned about each-others positions. they are independent of each-others positions. adding,removing or modifying any array element is very easy.Compared to arrays ,linked list is a comlicated sequence of numbers.each number in the linked list is connected to its previous & next no. via a link which is nothieng but a pointer.Addition,removal of no.s in linked list is related to this pointer direction & linking that no. to the no. which is already present in the list.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the difference between arrays and linked list?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you find the difference between two arrays in Java?

for arrays you can list the different arrays and what attributes that you give to them.


Difference between linear linked list and circular linked list?

LINEAR STRAIGHT CIRCULAR CURVED


Can you simulate linked list using arrays?

I would say no, but it really depends on your point of view. An array and a linked list can both hold the same data; the only difference is how they do so. The definition of a linked list is a sequence of connected nodes. An array is a contiguous block of memory, so you can think of an array as a linked list in which each element is spacially connected to the next.


Can a linked list implemented using an array be accessed by giving the location?

A linked list implemented with an array defeats the purpose of using a linked list, which is to address the memory allocation problems associated with arrays.


To enter n nos without using arrays in c?

Use a linked-list.


W difference between a linear linked list and a circular linked list?

I would say that there is no such thing as a circular queue. The point of a circular data structure is to allow the end to loop around to the beginning. Since you can only remove items from the beginning of a queue or add them to the front, having these two items linked has no purpose nor benefit.


What is the difference between linked list and Ordinary list?

A list is an abstract data structure, usually defined as an ordered collection of data. A linked list refers to a specific implementation of a list in which each element in the list is connected (linked) to the next element.


Comparison between linked and array lists?

The difference between linked and array lists is in how they are stored. Arrays are a predefined block of memory into which information is stored or recalled. Any data element from an array can be retrieved in O(1) time. But if you need to increase the size of the array, you would need to create a new one and copy the contents of the old one into it. Linked lists are usually dynamically allocated during run time, and the only way to get to a node (a data element) is to traverse the list until you find it which makes the retrieval time slower O(n) . The benefit of a linked list is that you can insert new data elements without having to copy or move all the elements in the list as you would in an array. The linked list is better for large databases that need to add and remove items often, whereas arrays are better for list sizes that generally don't change.


How do you represented linked list in memory?

Memory Representation of Linear Linked List:Let LIST is linear linked list. It needs two linear arrays for memory representation. Let these linear arrays are INFO and LINK. INFO[K] contains the information part and LINK[K] contains the next pointer field of node K. A variable START is used to store the location of the beginning of the LIST and NULL is used as next pointer sentinel which indicates the end of LIST. It is shown below:


What is the differnce between linked list and arrays?

A linked list is a series of elements, each containing a pointer or index to the next element in the list. You can dynamically add and delete elements in the list. An array is a contiguous block of repeated elements. Since each element is address-wise adjacent to the next element, there is no need for pointers or indexes to the "next" element. You can not dynamically add and delete elements in an array, although you can create "dynamic arrays" with (templates and) classes that auto-resize themselves. The STL does this for you, but it is a good exercise to implement it yourself.


What is the difference between doubly linked list and circular linked list?

A doubly linked list is a linked list in which each node knows where both of its neighbors are.A circular linked list is a linked list in which the "tail" of the list is linked to the "root". (Note that both the tail and root of the list are undefined/arbitrary in a circular linked list)Doubly linked lists are actually not necessarily related to circular linked list (aside from both being based on a linked list structure). In fact, you can have a circular doubly linked list, where each node knows where both of its neighbors are andwhere the list wraps around to connect to itself.


Difference between arrays and linked list?

each element in a linked list contains, in addition to data, one or more pointers to other element(s) in the list. such data structures are capable of changing size at runtime according to the needs of the programan array is simply a preallocated block of data elements. once allocated at compile/link time its size can never be changed