猫头鹰的咖啡馆
猫头鹰的咖啡馆
全部文章
题解
归档
标签
去牛客网
登录
/
注册
猫头鹰的咖啡馆的博客
全部文章
/ 题解
(共163篇)
题解 | #最长公共子序列-II# 逆推出公共子序列
class Solution { public: /** * longest common subsequence * @param s1 string字符串 the string * @param s2 string字符串 the string * ...
C++
2021-10-26
0
383
题解 | #最长公共子串# 常规dp
class Solution { public: /** * longest common substring * @param str1 string字符串 the string * @param str2 string字符串 the string ...
C++
2021-10-26
0
423
题解 | #寻找第K大# 快速搜索
class Solution { public: int findKth(vector<int> a, int n, int K) { return quickfind(a, 0, n-1, K); } int quickfind(ve...
C++
2021-10-26
0
361
题解 | #最小的K个数#
class Solution { public: void quickSort(vector<int> &input, int left, int right) { if (left >= right) { return; ...
C++
2021-10-26
0
330
题解 | #按之字形顺序打印二叉树#
/* struct TreeNode { int val; struct TreeNode *left; struct TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(N...
C++
2021-10-26
0
301
题解 | #求二叉树的层序遍历# queue层次遍历
/** * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * }; */ class Solution { public: /** * * @...
C++
2021-10-26
0
422
题解 | #实现二叉树先序,中序和后序遍历# 常见的二叉树遍历
/** * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * }; */ class Solution { public: /** * * @...
C++
2021-10-26
0
387
题解 | #反转链表# 画图更加清晰
/* struct ListNode { int val; struct ListNode *next; ListNode(int x) : val(x), next(NULL) { } };*/ class Solution { public: ListNode* Rever...
C++
2021-10-26
0
317
题解 | #单链表的排序# 亲自写一遍,再看看吧
/** * struct ListNode { * int val; * struct ListNode *next; * }; */ class Solution { public: /** * * @param head ListNode类 the he...
C++
2021-10-26
0
367
题解 | #排序# 数组的归并排序
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * 将给定数组排序 * @param arr int整型vector 待排序的数组 * @return int整型v...
C++
2021-10-26
0
330
首页
上一页
1
2
3
4
5
6
7
8
9
10
下一页
末页