小兄弟加油啊
小兄弟加油啊
全部文章
题解
归档
标签
去牛客网
登录
/
注册
小兄弟加油啊的博客
全部文章
/ 题解
(共38篇)
题解 | #大数加法#
class Solution { public: int s2i(char ch){ &n...
C++
2021-11-10
0
403
题解 | #删除链表的倒数第n个节点#
/** * struct ListNode { * int val; * struct ListNode *next; * }; */ class Solution { public: /** * * @param head ListNode类 ...
C++
2021-11-10
0
346
题解 | #有效括号序列#
class Solution { public: /** * * @param s string字符串 * @return bool布尔型 */ bool isValid(string s) { // write code ...
C++
2021-11-10
0
310
题解 | #链表中环的入口结点#
/* struct ListNode { int val; struct ListNode *next; ListNode(int x) : val(x), next(NULL) { } }; */ class Solution { public: ...
C++
2021-11-09
0
303
题解 | #链表中环的入口结点#
/* struct ListNode { int val; struct ListNode *next; ListNode(int x) : val(x), next(NULL) { } }; */ class Solution { public: ...
C++
2021-11-08
0
378
题解 | #合并两个有序的数组#
class Solution { public: void merge(int A[], int m, int B[], int n) { int i=0,j=0,k=0; int *C = new int[m+n]; while(i<m...
C++
2021-11-08
0
287
题解 | #判断链表中是否有环#
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} ...
C++
2021-11-07
0
250
题解 | #用两个栈实现队列#
class Solution { public: void push(int node) { this->stack1.push(node); } int pop() { int ret; if(stack2.empty...
C++
2021-11-07
0
219
题解 | #连续子数组的最大和#
O(1)空间复杂度, O(N)空间复杂度 class Solution { public: int FindGreatestSumOfSubArray(vector<int> array) { int size = array.size(); i...
C++
2021-11-07
0
305
题解 | #连续子数组的最大和#
class Solution { public: int FindGreatestSumOfSubArray(vector<int> array) { int size = array.size(); vector<int> dp(si...
C++
2021-11-07
0
322
首页
上一页
1
2
3
4
下一页
末页