随笔分类 - 刷题(mid)
中等难度的题,例如二叉树和图相关算法
摘要:#include<iostream> #include<string> #include<vector> #include<algorithm> using namespace std; vector<string> re{ {" "},{",."},{"abc"},{"def"},{"ghi"},
阅读全文
摘要:#include<iostream> #include<vector> #include<string> using namespace std; int max = 100; //分配函数 void alloc(vector<vector<int>> &address,int size) { if
阅读全文
摘要:#include<deque> #include<iostream> #include<vector> #include<algorithm> #include<string> //每次蛇移动只会有3种情况: // //1.撞墙(坐标越界)直接返回长度; //2.空格 第一步:将空格坐标body.p
阅读全文
摘要:寻找2个有序数组的中位数 [4. 寻找两个正序数组的中位数 - 力扣(LeetCode)][https://leetcode.cn/problems/median-of-two-sorted-arrays/] double findMedianSortedArrays(vector<int>& nu
阅读全文