Skip to content

Commit

Permalink
2024-07-02 23:32:20
Browse files Browse the repository at this point in the history
Affected files:
src/content/blog/leet-code-letter-combinations-of-a-phone-number.md
  • Loading branch information
gyunseo committed Jul 2, 2024
1 parent 55b4fee commit 4d0e035
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ digitAlphabetMap = {

class Solution:
def letterCombinations(self, digits: str) -> List[str]:
stringList = []
combinationList = []
string_list = []
combination_list = []
for d in digits:
stringList.append(digitAlphabetMap[d])
for comb in product(*stringList):
string_list.append(digitAlphabetMap[d])
for comb in product(*string_list):
if len(comb) == 0:
continue
combinationList.append("".join(comb))
return combinationList
combination_list.append("".join(comb))
return combination_list
```

## 다른 풀이 방법
Expand Down

0 comments on commit 4d0e035

Please sign in to comment.