Skip to content
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

Single Number #48

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Single Number #48

wants to merge 1 commit into from

Conversation

rihib
Copy link
Owner

@rihib rihib commented Dec 16, 2024

Single Numberを解きました。レビューをお願いいたします。

問題:https://leetcode.com/problems/single-number/
言語:Go

Comment on lines +17 to +19
if singleNums[n] > 1 {
delete(singleNums, n)
}
Copy link

Choose a reason for hiding this comment

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

私は、この判定を次のループに回すと思います。そちらのほうがデバッグしやすそうです。

Copy link

Choose a reason for hiding this comment

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

これは趣味の範囲でしょう。

Copy link
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants