摘要: 46. 全排列 排列,用回溯法 class Solution { public: vector<vector<int>> permute(vector<int>& nums) { vector<vector<int>> permutation; vector<bool> visited(nums.s 阅读全文
posted @ 2020-09-07 23:26 pusidun 阅读(94) 评论(0) 推荐(0) 编辑
摘要: 17. 电话号码的字母组合 排列题目,很容易想到回溯。下面是ac代码。 class Solution { private: vector<string> vstrs = {"","","abc","def","ghi","jkl","mno","pqrs","tuv","wxyz"}; public 阅读全文
posted @ 2020-09-07 16:07 pusidun 阅读(127) 评论(0) 推荐(0) 编辑