Skip to content

Add 83. Remove Duplicates from Sorted List.md#3

Open
t0hsumi wants to merge 3 commits intomainfrom
83
Open

Add 83. Remove Duplicates from Sorted List.md#3
t0hsumi wants to merge 3 commits intomainfrom
83

Conversation

@t0hsumi
Copy link
Copy Markdown
Owner

@t0hsumi t0hsumi commented Nov 24, 2024

next_node = self.deleteDuplicates(head.next)
if next_node is not None and head.val == next_node.val:
return next_node
else:
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

elseを消してインデントを下げると読みやすいかなと思いました

h1rosaka/arai60#2 (comment)

# なんかする
node = node.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.

解法を思いつくこつはこれですね。
自然言語で身体性をもって考えるというのがわりと大切だと思っています。

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.

3 participants