곱집합1 [leetcode] letter combinations of a phone number letter combinations of a phone number "2~9" 의 8가지 숫자의 조합으로 된 문자열을 입력으로 각 숫자는, 문자열 집합의 문자들 중 하나의 문자로 대응될수 있음 숫자열이 주어졌을때 조합가능한 모든 문자열 리턴 Solution 1 itertools의 product 이용 곱집합 code 1 from itertools import product class Solution(object): def letterCombinations(self, digits): """ :type digits: str :rtype: List[str] """ book = { '2':['a','b','c'], '3':['d'.. 2022. 1. 13. 이전 1 다음