wrdoct
wrdoct
全部文章
题解
复习(44)
面经(1)
归档
标签
去牛客网
登录
/
注册
wrdoct的博客
全部文章
/ 题解
(共88篇)
题解 | #链表的奇偶重排#
/** * struct ListNode { * int val; * struct ListNode *next; * ListNode(int x) : val(x), next(nullptr) {} * }; */ class Solution { public: /*...
C++
2022-06-11
0
305
题解 | #字符串合并处理#
来自专栏
#include <bits/stdc++.h> using namespace std; //char Intput[] = {"0123456789abcdefABCDEF"}; //输入参照字典(数字 + 大小写字母) //int Output[] = "084c2a6e195...
C++
2022-06-11
0
290
题解 | #进制转换#
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * 进制转换 * @param M int整型 给定整数 * @param N int整型 转换到的进...
2022-06-09
0
304
题解 | #素数伴侣#
来自专栏
#include <bits/stdc++.h> using namespace std; //判断一个数是否是素数 bool isPrime(int num){ for(int i = 2; i * i <= num; i++){ if(num % i...
C++
2022-06-09
0
205
题解 | #数据分类处理#
来自专栏
#include <bits/stdc++.h> using namespace std; bool isExist(string strI, string s){ return strstr(strI.c_str(), s.c_str()) != nullptr; //在s...
C++
2022-06-06
0
277
题解 | #字符逆序#
来自专栏
#include <bits/stdc++.h> using namespace std; void process(string str, string& res){ reverse(str.begin(), str.end()); res = str; }...
C++
2022-06-06
0
269
题解 | #简单错误记录#
来自专栏
#include <bits/stdc++.h> using namespace std; //只用输出最后出现的八条错误记录——考虑队列,超过八条时弹出 (双端队列,从后端进,从前端出) //对相同的错误记录只记录一条,但是错误计数增加——考虑哈希表,键为错误记录,值为错误计数 ...
C++
2022-06-05
0
308
题解 | #放苹果#
来自专栏
#include <bits/stdc++.h> using namespace std; int process(int m, int n){ if(m < 0 || n < 0){ return 0; } else if(m =...
C++
2022-06-04
0
272
题解 | #字符串加密#
来自专栏
#include <bits/stdc++.h> using namespace std; //encoder void encoder(string key, string str, string& res){ //如果单词中包含有重复的字母,只保留第1个,将所得结...
C++
2022-06-04
0
330
题解 | #输出单向链表中倒数第k个结点#
来自专栏
#include <bits/stdc++.h> using namespace std; struct ListNode { int m_nKey; ListNode* m_pNext; ListNode() : m_nKey(0), m_pNext(nul...
C++
2022-06-04
0
233
首页
上一页
1
2
3
4
5
6
7
8
9
下一页
末页