苦学编程30年
苦学编程30年
全部文章
分类
归档
标签
去牛客网
登录
/
注册
苦学编程30年的博客
TA的专栏
16篇文章
411人订阅
在线编程题
3篇文章
697人学习
嵌入式软件校招笔记
13篇文章
8562人学习
全部文章
(共22篇)
题解 | #从上往下打印二叉树#
/* struct TreeNode { int val; struct TreeNode *left; struct TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) { } };*/ //其实就是...
2023-04-16
1
286
题解 | #包含min函数的栈#
#include <vector> class Solution { public: vector<int > stack; void push(int value) { return stack.push_back(value); ...
2023-04-14
2
237
题解 | #链表中倒数第k个结点#
/* struct ListNode { int val; struct ListNode *next; ListNode(int x) : val(x), next(NULL) { } };*/ class Solution { publ...
2023-04-09
2
343
题解 | #二进制中1的个数#
class Solution { public: int NumberOf1(int n) { int count = 0; while (n!=0) { count++; n = n & (n-1); ...
2023-04-09
2
241
题解 | #矩形覆盖#
class Solution { public: int bp[40]; int rectCover(int number) { bp[1] = 1; bp[2] = 2; for(int i = 3; i<=number; i+...
2023-04-08
2
221
题解 | #跳台阶扩展问题#
class Solution { public: int dp[30]; int jumpFloorII(int number) { dp[1] = 1; int m = 1; for (int j = 2; j <= nu...
2023-04-04
2
218
题解 | #跳台阶#
class Solution { public: int dp[50]{0}; // initialize an array to store the number of ways to jump to each floor int jumpFloor(int number) { ...
2023-04-04
2
228
题解 | #斐波那契数列#
public class Solution { public int Fibonacci(int n) { if(n < 1) return 0; if(n == 1 || n == 2) return 1...
2023-04-03
2
207
题解 | #旋转数组的最小数字#
class Solution { public: int minNumberInRotateArray(vector<int> rotateArray) { int left = 0; int right = rotateArray.size(...
2023-04-03
2
265
题解 | #旋转数组的最小数字#
class Solution { public: int minNumberInRotateArray(vector<int> rotateArray) { int i = floor(rotateArray.size() / 2); int ...
2023-04-03
2
247
首页
上一页
1
2
3
下一页
末页