Skip to content

Update singly_linked_list_exercise.py #61

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update singly_linked_list_exercise.py
I think there is no need to add these 3 line of code.
  • Loading branch information
SajidHShanta authored Sep 15, 2022
commit 6da0b79ce7670117709d40ba7038d0c2c618522c
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,6 @@ def insert_after_value(self, data_after, data_to_insert):
if self.head is None:
return

if self.head.data==data_after:
self.head.next = Node(data_to_insert,self.head.next)
return

itr = self.head
while itr:
Expand Down