摘要: 455.分发饼干 题目链接 文章讲解 视频讲解 class Solution { public: int findContentChildren(vector<int>& g, vector<int>& s) { sort(g.begin(), g.end()); sort(s.begin(), s 阅读全文
posted @ 2024-06-07 22:11 深蓝von 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 51.N 皇后 题目链接 文章讲解 视频讲解 递归三部曲 递归函数参数 需要传入当前chessBoard和棋盘大小n,以及当前要放置皇后的行数rowvoid backtracking(vector<string>& chessBoard, int n, int row); 递归终止条件 当最后一个皇 阅读全文
posted @ 2024-06-07 17:07 深蓝von 阅读(2) 评论(0) 推荐(0) 编辑