Insertion in Singly Linked List (Insert After)
Now that we've covered "insert at head" and "insert at end", we will discuss "insert after" and implement it in Java.
We'll cover the following...
Insert After
The insertAfter
function takes the data of the new node and the node after, which we want to insert this new node. The illustration below will help jog your memory.
Access this course and 1400+ top-rated courses and projects.