牛客768685351号
牛客768685351号
全部文章
题解
归档
标签
去牛客网
登录
/
注册
牛客768685351号的博客
全部文章
/ 题解
(共160篇)
题解 | #环形链表的约瑟夫问题#
class Solution { public: /** * * @param n int整型 * @param m int整型 * @return int整型 */ int ysf(int n, int m) { ...
C++
2022-02-26
0
275
题解 | #最大数#
注意情形为[0, 0]时的情况,此时输出应该是“0”,而不是“00”; struct cmp{ bool operator() (const string& a, const string& b){ return a+b > b+a; } }; ...
C++
2022-02-26
0
318
题解 | #集合的所有子集(一)#
class Solution { private: vector<vector<int>> res; vector<int> path; public: vector<vector<int> > subsets(ve...
C++
2022-02-26
3
356
题解 | #没有重复项数字的全排列#
class Solution { private: vector<vector<int>> res; vector<int> path; public: vector<vector<int> > permute(ve...
C++
2022-02-26
0
273
题解 | #链表中倒数最后k个结点#
/** * struct ListNode { * int val; * struct ListNode *next; * ListNode(int x) : val(x), next(nullptr) {} * }; */ class Solution { public: /*...
C++
2022-02-26
0
311
题解 | #兑换零钱(一)#
class Solution { public: /** * 最少货币数 * @param arr int整型vector the array * @param aim int整型 the target * @return int整型 */ ...
C++
2022-02-26
0
268
题解 | #寻找峰值#
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param nums int整型vector * @return int整型 ...
C++
2022-02-26
0
265
题解 | #最小覆盖子串#
class Solution { private: unordered_map<char, int> tar; unordered_map<char, int> src; public: /** * * @param S stri...
C++
2022-02-26
0
344
题解 | #二维数组中的查找#
class Solution { public: bool Find(int target, vector<vector<int> > array) { int m = array.size(); if(m == 0){ ...
C++
2022-02-26
0
288
题解 | #数组中的逆序对#
class Solution { private: int res = 0; int kmod = 1000000007; public: int InversePairs(vector<int> data) { int n = data.size...
C++
2022-02-26
0
291
首页
上一页
4
5
6
7
8
9
10
11
12
13
下一页
末页