题目链接:https://leetcode.com/problems/letter-combinations-of-a-phone-number/
Given a digit string, return all possible letter combinations that the number could represent.
A mapping of digit to letters (just like on the telephone buttons) is given below.
Input:Digit string "23" Output: ["ad", "ae", "af", "bd", "be", "bf", "cd", "ce", "cf"].
Note:
Although the above answer is in lexicographical order, your answer could be in any order you want.
/** * Return an array of size *returnSize. * Note: The returned array must be malloced, assume caller calls free(). */ void SubCombination(char* digits, char map[][5], char* output, char** ret, int* returnSize, int k) { //k表示递归到当前字母的下标 int i = 0; if(digits[k] == '