牛客768685351号
牛客768685351号
全部文章
题解
归档
标签
去牛客网
登录
/
注册
牛客768685351号的博客
全部文章
/ 题解
(共160篇)
题解 | #字符串出现次数的TopK问题#
struct cmp{ bool operator() (const pair<string, int>& a, const pair<string, int>& b){ return a.second > b.second ||...
C++
2022-02-23
0
324
题解 | #字符串的排列#
class Solution { private: vector<string> res; string cur = ""; public: vector<string> Permutation(string str) { if(str...
C++
2022-02-23
0
279
题解 | #合并k个已排序的链表#
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} ...
C++
2022-02-23
0
261
题解 | #接雨水问题#
class Solution { public: /** * max water * @param arr int整型vector the array * @return long长整型 */ long long maxWater(vector...
C++
2022-02-23
0
368
题解 | #岛屿数量#
class Solution { public: /** * 判断岛屿数量 * @param grid char字符型vector<vector<>> * @return int整型 */ int solve(vect...
C++
2022-02-23
0
297
题解 | #数组中出现次数超过一半的数字#
class Solution { public: int MoreThanHalfNum_Solution(vector<int> numbers) { int num = -1; int cnt = 0; for (int i=0...
C++
2022-02-23
0
265
题解 | #矩阵的最小路径和#
class Solution { public: /** * * @param matrix int整型vector<vector<>> the matrix * @return int整型 */ int minPat...
C++
2022-02-23
0
262
题解 | #进制转换#
class Solution { public: /** * 进制转换 * @param M int整型 给定整数 * @param N int整型 转换到的进制 * @return string字符串 */ string solve...
C++
2022-02-23
0
292
题解 | #最长上升子序列(三)#
class Solution { public: vector<int> LIS(vector<int>& arr) { int len = 1, n = (int)arr.size(); if (n == 0) { ...
C++
2022-02-23
0
302
题解 | #包含min函数的栈#
class Solution { private: stack<int> st1; stack<int> st2; public: void push(int value) { st1.push(value); if(s...
C++
2022-02-23
0
248
首页
上一页
7
8
9
10
11
12
13
14
15
16
下一页
末页