摘要:
//这题感觉不如前两题回溯清楚,还要再看看class Solution { public: vector generateParenthesis(int n) { vector res; string add; DFS(res,add,n,n); return res; } void DFS(vec... 阅读全文
摘要:
//狂练回溯,巧用备胎class Solution { public: vector letterCombinations(string digits) { vector res; if(digits == "") return res; string add; DFS(res,add,digits,0); ... 阅读全文
摘要:
//这是我写过最难的递归了。。。//class Solution { public: bool exist(vector>& board, string word) { int m = board.size(); int n = board[0].size(); for(int i=0;i >& board,string word,int ... 阅读全文