Skip to content

Solve 83. Remove Duplicates from Sorted List (step 1, 2)#8

Open
cheeseNA wants to merge 2 commits intomainfrom
83
Open

Solve 83. Remove Duplicates from Sorted List (step 1, 2)#8
cheeseNA wants to merge 2 commits intomainfrom
83

Conversation

@cheeseNA
Copy link
Copy Markdown
Owner

Problem link
参照した他の解答についてはnote.mdに記載しております.

Comment on lines +10 to +13
seeking_next = cursor.next
while seeking_next and seeking_next.val == cursor.val:
seeking_next = seeking_next.next
cursor.next = seeking_next
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

この部分関数に切り出しても良いかもですね。too muchかもですが。

cursor.next = skip_duplicated_nodes(cursor.next, cursor.val)

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

切り出すのも良いですね. ありがとうございます

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