10000 Update linked_list.py by Prasang-money · Pull Request #9 · jwasham/practice-python · GitHub
[go: up one dir, main page]

Skip to content

Update linked_list.py #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 11, 2021
Merged

Update linked_list.py #9

merged 1 commit into from
Jul 11, 2021

Conversation

Prasang-money
Copy link
Contributor

Deletes all instances of given value in list.

changes in that particular file
when 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 iteration

# Deletes all instances of given value in list. 
changes in that particular file
when 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 iteration
@jwasham jwasham merged commit ab1cbe1 into jwasham:master Jul 11, 2021
@jwasham
Copy link
Owner
jwasham commented Jul 11, 2021

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0