전화번호의 문자 조합
숫자와 문자의 매핑(전화 버튼과 동일)이 아래에 나와 있습니다. 1은 어떤 문자에도 매핑되지 않습니다.
class Solution(object):
    def letterCombinations(self, digits):
        res = []
        if not digits:
            return res
        d = {
            "2":"abc", 
            "3": "def",
            "4":"ghi", 
            "5": "jkl", 
            "6":"mno", 
            "7": "pqrs", 
            "8":"tuv", 
            "9": "wxyz",    
        }
        def backtrack(i, curStr):
            if len(curStr) == len(digits):
                res.append(curStr)
                return
            for c in d[digits[i]]:
                backtrack(i + 1, curStr + c)
        backtrack(0, "")
        return res
Reference
이 문제에 관하여(전화번호의 문자 조합), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://dev.to/salahelhossiny/letter-combinations-of-a-phone-number-2g6b텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
                                
                                
                                
                                
                                
                                우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)