叶俊超
叶俊超
全部文章
分类
归档
标签
去牛客网
登录
/
注册
叶俊超的博客
全部文章
(共5篇)
题解 | 走迷宫
#include<bits/stdc++.h> using namespace std; using ll = long long; // 博主能力有限,如有错误欢迎指正 int dx[] ={-1,0,0,1}; // a s w d 每一次走的位置 **** 可以思考为什么这样...
2026-03-06
1
44
题解 | 判断一个链表是否为回文结构
使用栈判断回文 /** * struct ListNode { * int val; * struct ListNode *next; * ListNode(int x) : val(x), next(nullptr) {} * }; */ class Solution { public...
2026-02-14
1
53
题解 | 机器翻译
使用集合避免在缓存中进行n次查询,缩短至logn次 #include <iostream> #include<queue> #include<set> using namespace std; queue<int> fr; set<int>...
2026-01-30
1
52
题解 | 验证栈序列
#include <iostream> // #include<stack> #include<vector> using namespace std; // #define test for(int ai:an) {cout << ai <&l...
2026-01-28
1
40
题解 | 自动管理停车场桩位系统
class Solution { public: stack<int> st ,st_min;//由于新加的最小值只与当前的最小值有关,所以可以开一个新栈表示当前最小值 // 车位 4 6 2 1 6 3 对应最小值 1 1 1 1 3 3 这样移车时只需将最小...
2026-01-28
2
53