adding the insert animation

This commit is contained in:
Jidong Xiao
2023-10-02 11:01:45 -04:00
parent 8e2189de61
commit 1fab8f8d7e

View File

@@ -264,6 +264,8 @@ q -> next = p -> next; // make its successor be the current successor of p
p -> next = q; // make p's successor be this new node
```
- Play this [animation](https://jidongxiao.github.io/CSCI1200-DataStructures/animations/lists/insert/index.html) to see how this code snippet works.
- Note: This code will not work if you want to insert x in a new node at the front of the linked list. Why not?
## 10.13 Removing a Node from a Singly-Linked List