Skip to content

1. Two Sum#11

Open
rimokem wants to merge 1 commit into
mainfrom
0001-two-sum
Open

1. Two Sum#11
rimokem wants to merge 1 commit into
mainfrom
0001-two-sum

Conversation

@rimokem
Copy link
Copy Markdown
Owner

@rimokem rimokem commented Apr 2, 2026

Comment thread 0001/step3.py
if complement in num_to_index:
return [num_to_index[complement], i]
num_to_index[num] = i
raise ValueError("No pair found that sums to target")
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

とてもいいと思います。

まだ目を通していなければ、以下のコメントなどにも目を通しておいてもいいと思います。
https://discord.com/channels/1084280443945353267/1183683738635346001/1187326805015810089
入力として想定されるものを考えながら、実装の選択肢を広げられるといいと思います。

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