满加
满加
全部文章
分类
归档
标签
去牛客网
登录
/
注册
满加的博客
全部文章
(共51篇)
题解 | 【模板】集合操作
C++ #include <array> #include<bits/stdc++.h> using namespace std; class Set { private: array<int, 100000> s; int len=0; ...
2025-08-11
0
24
题解 | 【模板】队列操作
C++ 顺序队列 #include <array> #include <iostream> using namespace std; class queue{ private: array<int, 100000> q; int head...
2025-08-08
0
19
题解 | 【模板】栈的操作
C++ #include <array> #include <iostream> using namespace std; class stack{ private: array<int, 100000> s; int top=-1; ...
2025-08-07
0
20
题解 | 【模板】序列操作
C++ #include <algorithm> #include <array> #include <iostream> using namespace std; class seq{ private: array<int, 70...
2025-08-07
0
24
题解 | 删除链表中重复的结点
C++ 判断 next 不等于 next next 纠结了很久 希望长点记性 class Solution { public: ListNode* deleteDuplication(ListNode* pHead) { ListNode* L = new ListNod...
2025-08-07
0
21
题解 | 从尾到头打印链表
C++ class Solution { public: vector<int> printListFromTailToHead(ListNode* head) { // 先反转链表再输出 vector<int> rev; // pus...
2025-08-06
0
19
题解 | 删除链表的节点
C++ /** * struct ListNode { * int val; * struct ListNode *next; * ListNode(int x) : val(x), next(nullptr) {} * }; */ class Solution { public: ...
2025-08-06
0
20
题解 | 合并两个排序的链表
C++ ①正常合并-用带哨兵节点的链表 ②递归 class Solution { public: ListNode* Merge(ListNode* pHead1, ListNode* pHead2) { // write code here ListNo...
2025-08-06
0
19
题解 | 反转链表
C++ curr->next = prev; prev = curr; /** * struct ListNode { * int val; * struct ListNode *next; * ListNode(int x) : val(x), next(nullptr) {} *...
2025-08-05
0
15
题解 | 【模板】链表
C++ #include <cstddef> #include <cstdlib> #include <iostream> using namespace std; using list = struct list { int data; lis...
2025-08-05
0
19
首页
上一页
1
2
3
4
5
6
下一页
末页