牛客768685351号
牛客768685351号
全部文章
分类
题解(160)
归档
标签
去牛客网
登录
/
注册
牛客768685351号的博客
全部文章
(共163篇)
题解 | #最小覆盖子串#
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
题解 | #二分查找-II#
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * 如果目标值存在返回下标,否则返回 -1 * @param nums int整型vector * ...
C++
2022-02-25
0
356
题解 | #二叉搜索树的第k个节点#
/** * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {...
C++
2022-02-25
0
296
题解 | #字符串变形#
class Solution { public: string trans(string s, int n) { // write code here int left = 0, right = s.length()-1; char temp;...
C++
2022-02-25
0
270
题解 | #回文数字#
class Solution { public: /** * * @param x int整型 * @return bool布尔型 */ bool isPalindrome(int x) { // write code he...
C++
2022-02-25
0
407
题解 | #最长公共前缀#
class Solution { public: /** * * @param strs string字符串vector * @return string字符串 */ string longestCommonPrefix(vector<...
C++
2022-02-25
0
307
题解 | #加起来和为目标值的组合(二)#
class Solution { private: int cur_num = 0; vector<int> cur_path; vector<vector<int>> res; public: vector<vector&l...
C++
2022-02-25
0
312
题解 | #链表的奇偶重排#
/** * struct ListNode { * int val; * struct ListNode *next; * ListNode(int x) : val(x), next(nullptr) {} * }; */ class Solution { public: /*...
C++
2022-02-25
0
319
首页
上一页
5
6
7
8
9
10
11
12
13
14
下一页
末页