其他分享
首页 > 其他分享> > 【leetcode题解】电话号码的字母组合

【leetcode题解】电话号码的字母组合

作者:互联网

题目链接

17. 电话号码的字母组合

题目描述

个人想法:

DFS

代码:


知识点:

unordered_map<char, string> mp = {
            {'a', "hello"},
            {'b', "world"}
    };

取某一个键对应值(也可以采用数组遍历方式)

cout << mp.at('a') << endl;

插入某个值

mp.insert({'c',"nihao"});

标签:map,题目,题解,unordered,mp,电话号码,字母组合,leetcode
来源: https://blog.csdn.net/m0_47746932/article/details/120408188