forked fromjwasham/practice-python
- Notifications
You must be signed in to change notification settings - Fork0
Commit083ce97
authored
Update linked_list.py
# Deletes all instances of given value in list. changes in that particular filewhen we are deleting a node in that particular case we do not need to update the prev value otherwise prev will be pointed to the deleted node. So in the updated code, we will update prev only if the current node value is not equal to the target value. and the current node will be updated at every iteration1 parent593b735 commit083ce97
1 file changed
+2
-1
lines changedLines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
52 | 52 |
| |
53 | 53 |
| |
54 | 54 |
| |
55 |
| - | |
| 55 | + | |
| 56 | + | |
56 | 57 |
| |
57 | 58 |
| |
58 | 59 |
| |
|
0 commit comments
Comments
(0)