Skip to content

49. Group Anagrams#35

Open
hiro111208 wants to merge 2 commits into
mainfrom
49-group-anagrams
Open

49. Group Anagrams#35
hiro111208 wants to merge 2 commits into
mainfrom
49-group-anagrams

Conversation

@hiro111208
Copy link
Copy Markdown
Owner

This problem: 49. Group Anagrams

Next problem: 200. Number of Islands

# Step 1

- string毎に、アルファベットが何回出たかをa-zの配列に記録する
- dictに配列をキーとする、stringを追加していく
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

「tupleをキー」ですかね(コードを見る感じ)
配列はunhashableです

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.

指摘ありがとうございます。
おっしゃる通り、「tupleをキー」です。配列とtupleを同一視していましたが、hash化のことを考えると間違った表現でした。

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