小兄弟加油啊
小兄弟加油啊
全部文章
题解
归档
标签
去牛客网
登录
/
注册
小兄弟加油啊的博客
全部文章
/ 题解
(共38篇)
题解 | #求二叉树的层序遍历#
/** * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * }; */ class Solution { public: /** * * @...
C++
2021-11-06
0
384
题解 | #最长无重复子数组#
class Solution { public: /** * * @param arr int整型vector the array * @return int整型 */ int maxLength(vector<int>&...
C++
2021-11-05
0
348
题解 | #链表中的节点每k个一组翻转#
/** * struct ListNode { * int val; * struct ListNode *next; * }; */ class Solution { public: ListNode* reverse(ListNode* head){ ...
C++
2021-11-02
0
336
题解 | #跳台阶#
class Solution { public: int jumpFloor(int number) { vector<int> dp(number+1); dp[0] = 0, dp[1] = 1, dp[2]=2; ...
C++
2021-10-31
0
286
题解 | #寻找第K大#
class Solution { public: void swap(int &p, int &q){ int temp = p; p = q; q = temp; } int adjust(...
C++
2021-10-31
0
319
题解 | #寻找第K大#
class Solution { public: void swap(int *p, int *q){ int temp = *p; *p = *q; *q = temp; } void my_qsort(v...
C++
2021-10-31
0
349
题解 | #最小的K个数#
class Solution { public: void swap(int *p, int *q){ int temp = *p; *p = *q; *q = temp; } int adjustBigHe...
C++
2021-10-31
0
365
题解 | #合并两个排序的链表#
/* struct ListNode { int val; struct ListNode *next; ListNode(int x) : val(x), next(NULL) { } };*/ class Solution { public: ListNode* Merge...
C++
2021-10-30
0
293
题解 | #实现二叉树先序,中序和后序遍历#
/** * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * }; */ class Solution { public: void preOrder(T...
C++
2021-10-30
0
319
题解 | #两数之和#
class Solution { public: /** * * @param numbers int整型vector * @param target int整型 * @return int整型vector */ vector&...
C++
2021-10-30
0
339
首页
上一页
1
2
3
4
下一页
末页