answersLogoWhite

0

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

15y ago

What else can I help you with?

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.


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:


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

Oh, dude, a linear linked list is like a straight line where each element points to the next one, while a circular linked list is like a loop-de-loop rollercoaster where the last element points back to the first one. So, in a linear list, you reach the end and it's like hitting a wall, but in a circular list, you just keep on looping around for eternity. It's like the difference between a dead-end street and a roundabout.


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 are the differences between an adjacency matrix and an adjacency list in terms of representing graph data structures?

An adjacency matrix is a 2D array that represents connections between nodes in a graph, with each cell indicating if there is an edge between two nodes. An adjacency list is a collection of linked lists or arrays that stores the neighbors of each node. The main difference is that an adjacency matrix is more space-efficient for dense graphs, while an adjacency list is more efficient for sparse graphs.


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