Batch - B Practical Test Question

Batch - B Practical Test Question
Batch - B Practical Test Question

Linked List

Linked List

In order to avoid the linear cost of insertion and deletion, we need to ensure that the list is not stored contiguously, since otherwise entire parts of the list will need to be moved. 

A linked list, in its simplest form, is a collection of nodes that together form a linear ordering. 

Linked Lists are a very common way of storing arrays of data. The major benefit of linked lists is that you do not specify a fixed size for your list. The more elements you add to the chain, the bigger the chain gets. 

The linked list consists of a series of nodes, which are not necessarily adjacent in memory. Each node contains the element and a link to a node containing its successor. We call this the next link. The last cell’s next link references null. 

Linked List

Comments