Linked list types C++
Following are the types of Linked List 1. Singly Linked List 2. Doubly Linked List 3. Circular Linked List 4. Doubly Circular Linked List
#include } Output:
Important Note: First node is always pointed by head. In doubly linked list, previous field of the first node is always NULL (it must be NULL) and the next field of the last must be NULL. In the above figure we see that, doubly linked list contains three fields. In this, link of two nodes allow traversal of the list in either direction. There is no need to traverse the list to find the previous node. We can traverse from head to tail as well as tail to head.
#include } Output:
#include } Output: 1. Create
2. Search
3. Delete
|