Skip to content

82. Remove Duplicates from Sorted List II - #4

Open
gracefulm wants to merge 1 commit into
mainfrom
82_remove_duplicates_from_sorted_list_2
Open

82. Remove Duplicates from Sorted List II#4
gracefulm wants to merge 1 commit into
mainfrom
82_remove_duplicates_from_sorted_list_2

Conversation

@gracefulm

@gracefulm gracefulm commented Sep 3, 2026

Copy link
Copy Markdown
Owner

問題

82. Remove Duplicates from Sorted List II

問題文概要(プレミアムの場合)

nop

次に解く問題の予告など

2. Add Two Numbers

Generated with Claude Code

https://claude.ai/code/session_01WjjfbGDR7xMJX1ed6Yp215

headExists bool
shouldSkip bool
)
for current := head; current.Next != nil; current = current.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.

こちらのコメントをご参照ください。
riku359/LeetCode#9 (comment)

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.

コメントありがとうございます。リンク元のコメントを確認しました。
step2やstep3ではnextとの対比でcurrentを使っていますが、この実装(step1)の場合は、あえてcurrentという変数名にする必要はなさそうだと感じまました。
改めて考えると、currentNodeとするか単純にnode、もしくはGoの慣習(変数名を短く略す)に従いnの方が良さそうですね。

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