Source Code: https://www.instms.com/data-structure...
In today video session we are going to discuss a dynamic data structure in C++. This dynamic data structure is called linked list. In linked list data structure there are multiple memory locations having same size but not continuous. Means that unlike arrays linked list is not a continuous set of memory locations. In singly linked list each node contains the address of the next node. Which is used for different operations such as.
1. Traversal
2. Retrieval
3. Searching
4. Sorting
5. Deletion
In link list new node can be inserted at the beginning or at the end. Insertion at beginning is called pre-append and insertion at end is called append operation. Traversal in link list is always performed with the help of head node.
For the implementation one node is specified as Head node in entire link list. The other nodes are connected with head node using next pointer. In singly link list the last node has NULL in its pointer part. In this session we have also discussed advantages and disadvantages of link list. Linked list data structure is suitable where the no of data items are not known in advance.
Where data size grows and reduce dynamically link list are used. Because after removing the data item we can return the deleted node to free space using fee() method in C++.
Here we have link list animation that will help you for better understanding.