From 9b287d7936961389fd8e673b0fb6e4c83b1d804c Mon Sep 17 00:00:00 2001 From: Vidhi Gupta Date: Sat, 3 Aug 2024 11:47:18 +0530 Subject: [PATCH 1/2] Update Implementation.py --- 03. Data Structures/Linked Lists/Implementation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/03. Data Structures/Linked Lists/Implementation.py b/03. Data Structures/Linked Lists/Implementation.py index 22c4dcd..2ec0896 100644 --- a/03. Data Structures/Linked Lists/Implementation.py +++ b/03. Data Structures/Linked Lists/Implementation.py @@ -2,7 +2,7 @@ #It consists of nodes which contain data and a pointer to the next node in the list. #The list is connected with the help of these pointers. #These nodes are scattered in memory, quite like the buckets in a hash table. -#The node where the list starts is called the head of theblist and the node where it ends, or last node, is called the tail of the list. +#The node where the list starts is called the head of the list and the node where it ends, or last node, is called the tail of the list. #The average time complexity of some operations invloving linked lists are as follows: #Look-up : O(n) #Insert : O(n) From 2762ea67990cef2e2d64c9671fba67f9e9977b5f Mon Sep 17 00:00:00 2001 From: Vidhi Gupta Date: Sat, 3 Aug 2024 11:54:34 +0530 Subject: [PATCH 2/2] Update Implementation.py --- 03. Data Structures/Linked Lists/Implementation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/03. Data Structures/Linked Lists/Implementation.py b/03. Data Structures/Linked Lists/Implementation.py index 2ec0896..163d0d7 100644 --- a/03. Data Structures/Linked Lists/Implementation.py +++ b/03. Data Structures/Linked Lists/Implementation.py @@ -49,7 +49,7 @@ def append(self, data): self.length += 1 -#Next operation we'll implement is prepend, wehre we add a node at the head of the list. +#Next operation we'll implement is prepend, where we add a node at the head of the list. #For this, we will call the prepend method and pass the value we want to enter, which will create a new object of the node class #Then we will make the 'next' of the new node point to the head ,as the head is currently pionting to the first node of the list #And then we will update the head to point to new node as we want the new node to be new first node, i.e, the new head.