摘要:
[Algo] 洪水填充 1. 被围绕的区域 // 1. 被围绕的区域 // https://leetcode.cn/problems/surrounded-regions/description/ void dfs1(vector<vector<char>>& board, int i, int j 阅读全文
posted @ 2025-01-06 09:33
yaoguyuan
阅读(14)
评论(0)
推荐(0)
摘要:
[Algo] 并查集 基本模型: int father[MAXN]; int sets; void build(int n) { for (int i = 0; i < n; i++) father[i] = i; sets = n; } int find(int i) { if (father[i 阅读全文
posted @ 2025-01-06 09:33
yaoguyuan
阅读(8)
评论(0)
推荐(0)
摘要:
[Algo] 单调队列 1. 滑动窗口最大值 // 1. 滑动窗口最大值 // https://leetcode.cn/problems/sliding-window-maximum/description/ vector<int> maxSlidingWindow(vector<int>& num 阅读全文
posted @ 2025-01-06 09:33
yaoguyuan
阅读(11)
评论(0)
推荐(0)
浙公网安备 33010602011771号