注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号 
x
Leetcode 题
时间复杂度是关键: O(4^N)
""Given a string of phone digits and a catalog or directory containing valid names, print all the possible letter combinations that form names that exist in the directory.
A main use case is to convert phone numbers into easy-to-remember ones. For instance, “1 800 BLUBIRD" is much easier to remember than "1 800 2582473"
Keypad: ![]()
Input
String[] numberToLetters: ["0", "1", "abc", "def", &quoongest length of word
String[] numberToLetters: ["0", "1", "abc", "def", "ghi", "jkl", "mno", "pqrs", "tuv", "wxyz"]
Output 2:
["bats", "cats"]
"""
|