Dastro
Dastro
全部文章
分类
题解(19)
归档
标签
去牛客网
登录
/
注册
Dastro的博客
全部文章
(共22篇)
题解 | 牛群的合并
/** * struct ListNode { * int val; * struct ListNode *next; * ListNode(int x) : val(x), next(nullptr) {} * }; */ class Solution { public: ...
2024-12-16
0
31
题解 | #顺时针旋转矩阵#
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param mat int整型vector<vector<>> ...
2024-10-06
0
59
题解 | #最长回文子串#
#include <cstddef> class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param A string字符串 *...
2024-10-06
0
58
题解 | #链表相加(二)#
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} ...
C++
2022-06-28
0
343
题解 | #两个链表的第一个公共结点#
/* struct ListNode { int val; struct ListNode *next; ListNode(int x) : val(x), next(NULL) { } };*/ class Solution { public: ListNode* FindF...
C++
2022-06-27
0
293
题解 | #对称的二叉树#
/* struct TreeNode { int val; struct TreeNode *left; struct TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(N...
C++
2022-06-27
0
326
题解 | #合并两个排序的链表#
class Solution { public: ListNode* Merge(ListNode* pHead1, ListNode* pHead2) { if(pHead1 == NULL && pHead2 == NULL){ ...
C++
2022-06-26
0
258
题解 | #参数解析#
需要截的情况 1.num % 2 == 0 并出现' ' 2.num % 2 == 0 并出现'"',是“开始的地方 3.num % 2 == 1 并出现'"',是”结束的地方 每个substr判断一下是不是空串防止空格和引号接连出现 循环结束还剩最后一个空格或右引号到末尾的子串没截取 #...
C++
2022-06-11
0
306
题解 | #成绩排序#
#include<bits/stdc++.h> using namespace std; struct stu{ string name; int score; int pos; }; vector<stu> vec; bool cmp_0(stu a...
C++
2022-06-08
3
307
题解 | #DNA序列#
#include<bits/stdc++.h> using namespace std; vector<string> vec; int main() { string str; int n; cin >> str >> n; ...
C++
2022-06-08
0
264
首页
上一页
1
2
3
下一页
末页