What is linked list in data structure?
Answers
A linked list is a linear Data Structure. Its a collection of data elements, called nodes pointing to the next node by means of a pointer. Linked lists are used for creating graphs and trees.
In a linked list each node consists of its own data and the address(link) of the next node hence it forms a chain.
Linked List in Data Structures :
- Linked list is a linear data structure in which the elements are stored in non-contiguous memory locations. So, we can say that the linked list goes on expanding and shriking time to time in run time and uses the space in it efficiently.
- Each location in the linked list is called as node which is further divided into 2 cells.
1. Data field : In which the data is stored.
2. Next reference field : Address to the next node that exists in the list
Refer the ATTACHMENT for easy understanding.
- The starting node is reachable using the head of the list; an entry point.
- Every linked list is ended with NULL as a reference in the last node reference field of the list of elements.
Applications : (Because of their efficient insertion and deletion)
- Implementation of linear data structures such as stacks and queues.
- Implementation of non linear data structures such as graphs.
- Implementation of hash tables.
- Representation or storage of polynomials and in applying operations on them.
and many more...
In our real life, we can see this in web page navigations from front to back and viceversa using buttons.
Learn more :
1. What is list comprehension python?
https://brainly.in/question/6964716
2. Noisy values are the values that are valid for the dataset, but are incorrectly recorded. Is it?
https://brainly.in/question/6658996