Professional Documents
Culture Documents
• Singly/Simple- forward
• Doubly- forward/backward
• Circular- can be inserted
Let's create a structure for a single node first.
Since a node consists of the data part and the
next part, here is how the structure looks:
Creating C++ Linked List
If you add a new node at the end of the list, it'll become the end
of the traversal within the list. In other words, you should set the
new node to point at NULL.
Inserting at a Specific Position
The purpose of this method is to put a new node between the
head and the tail. You have to fill the data and adjust the pointer
of the new node with its previous node.