LeetCode
GeneralJing
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
LeetCode 机器人的运动范围 ----medium
class Solution { public: int movingCount(int m, int n, int k) { if (k==0) return 1; vector<vector<bool>> valid(m, vector<bool>(n, true));// 记录该位置是否被访问过 return dfs(valid, m, n, 0, 0, k); } .原创 2020-11-23 20:48:59 · 153 阅读 · 0 评论 -
LeetCode 矩阵中的路径 ----medium
代码是在LeetCode中写的,所以函数、参数的形式是LeetCode的形式。这个代码是看到一位网友写的,非常直观,容易理解。 class Solution{ public: bool exist(vector<vector<char>>& board, string word) { if (word.empty()) return false; for原创 2020-11-23 09:37:54 · 231 阅读 · 0 评论
分享