Skip to content

Create first_unique_character_in_a_string#5

Open
tshimosake wants to merge 3 commits intomasterfrom
tshimosake-patch-4
Open

Create first_unique_character_in_a_string#5
tshimosake wants to merge 3 commits intomasterfrom
tshimosake-patch-4

Conversation

@tshimosake
Copy link
Owner

from collections import defaultdict
class Solution:
def firstUniqChar(self, s: str) -> int:
char_nums = defaultdict(int)
Copy link

Choose a reason for hiding this comment

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

char_nums ですと、「文字の番号」を表しているように感じられました。 dict (defaultdict) であることを表すため、 char_and_nums char_to_nums あたりが良いと思います。

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