From 1fab8f8d7efd0a969f61893beb6300005da9e79b Mon Sep 17 00:00:00 2001 From: Jidong Xiao Date: Mon, 2 Oct 2023 11:01:45 -0400 Subject: [PATCH] adding the insert animation --- lectures/10_linked_lists/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lectures/10_linked_lists/README.md b/lectures/10_linked_lists/README.md index f0f1973..10cb45f 100644 --- a/lectures/10_linked_lists/README.md +++ b/lectures/10_linked_lists/README.md @@ -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