在划水的土拨鼠很有气魄
在划水的土拨鼠很有气魄
全部文章
分类
归档
标签
去牛客网
登录
/
注册
在划水的土拨鼠很有气魄的博客
全部文章
(共49篇)
题解 | #【模板】堆#
#include <bits/stdc++.h> using namespace std; int main() { priority_queue<int, vector<int>, less<int> >q; int n; ...
2024-03-19
0
188
题解 | #实现二叉树先序,中序和后序遍历#
/** * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {...
2024-03-19
0
199
题解 | #合并两个排序的链表#
一、比较大小一个一个结点插入 /** * struct ListNode { * int val; * struct ListNode *next; * ListNode(int x) : val(x), next(nullptr) {} * }; */ class Solution {...
2024-03-19
0
216
题解 | #反转链表#
方法一:构建一个栈 /** * struct ListNode { * int val; * struct ListNode *next; * ListNode(int x) : val(x), next(nullptr) {} * }; */ class Solution { publ...
2024-03-19
0
201
题解 | #删除链表的节点#
/** * struct ListNode { * int val; * struct ListNode *next; * ListNode(int x) : val(x), next(nullptr) {} * }; */ class Solution { public: /*...
2024-03-18
0
245
题解 | #【模板】链表#
#include <iostream> using namespace std; struct list { int data; list* next; }; void insert(list* p, int x, int y) { list* q = p; ...
2024-03-18
0
203
题解 | #【模板】循环队列#
#include <iostream> const int N = 1e5 + 5; using namespace std; struct queue { int a[N]; int rear, head; queue() { rear = he...
2024-03-18
0
228
题解 | #相差不超过k的最多数#
#include <bits/stdc++.h> using namespace std; int main() { int n, k, sum=1; cin >> n >> k; int a[n]; for(int i=0; ...
2024-03-10
0
209
题解 | #逆波兰表达式求值#
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param tokens string字符串vector * @return int整型...
2024-03-03
0
200
题解 | #有效括号序列#
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param s string字符串 * @return bool布尔型 */ ...
2024-03-02
0
199
首页
上一页
1
2
3
4
5
下一页
末页