小兄弟加油啊
小兄弟加油啊
全部文章
分类
题解(38)
归档
标签
去牛客网
登录
/
注册
小兄弟加油啊的博客
全部文章
(共39篇)
题解 | #连续子数组的最大和#
class Solution { public: int FindGreatestSumOfSubArray(vector<int> array) { int size = array.size(); vector<int> dp(si...
C++
2021-11-07
0
326
题解 | #求二叉树的层序遍历#
/** * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * }; */ class Solution { public: /** * * @...
C++
2021-11-06
0
389
题解 | #最长无重复子数组#
class Solution { public: /** * * @param arr int整型vector the array * @return int整型 */ int maxLength(vector<int>&...
C++
2021-11-05
0
355
题解 | #链表中的节点每k个一组翻转#
/** * struct ListNode { * int val; * struct ListNode *next; * }; */ class Solution { public: ListNode* reverse(ListNode* head){ ...
C++
2021-11-02
0
344
题解 | #跳台阶#
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
296
题解 | #寻找第K大#
class Solution { public: void swap(int &p, int &q){ int temp = p; p = q; q = temp; } int adjust(...
C++
2021-10-31
0
332
题解 | #寻找第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
360
题解 | #最小的K个数#
class Solution { public: void swap(int *p, int *q){ int temp = *p; *p = *q; *q = temp; } int adjustBigHe...
C++
2021-10-31
0
379
题解 | #合并两个排序的链表#
/* struct ListNode { int val; struct ListNode *next; ListNode(int x) : val(x), next(NULL) { } };*/ class Solution { public: ListNode* Merge...
C++
2021-10-30
0
308
题解 | #实现二叉树先序,中序和后序遍历#
/** * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * }; */ class Solution { public: void preOrder(T...
C++
2021-10-30
0
334
首页
上一页
1
2
3
4
下一页
末页