We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 53de9d4 commit 20d36f6Copy full SHA for 20d36f6
contrib/ds-algorithms/linked-list.md
@@ -167,10 +167,10 @@ check the list is empty otherwise shift the head to next node.
167
temp = self.head
168
while(temp):
169
nextNode = temp.next #Store the next node
170
- temp.next = prev #Reverse the pointer of current node
171
- prev = temp #Move `prev` one step forward
172
- temp = nextNode #Move `temp` one step forward.
173
- self.head = prev #Update the head pointer to last node
+ temp.next = prev # Reverse the pointer of current node
+ prev = temp # Move prev pointer one step forward
+ temp = nextNode # Move temp pointer one step forward.
+ self.head = prev # Update the head pointer to last node
174
```
175
176
### Search in a linked list
0 commit comments