菜逼学编程
菜逼学编程
全部文章
分类
归档
标签
去牛客网
登录
/
注册
菜逼学编程的博客
全部文章
(共40篇)
题解 | 栈的压入、弹出序列
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param pushV int整型vector * @param popV int整型v...
2025-08-10
0
17
题解 | 日期累加
#include <iostream> using namespace std; #include <assert.h> class Date { public: Date(int year = 0, int month = 0, int day = 0) ...
2025-07-22
0
22
题解 | 打印日期
#include <iostream> using namespace std; #include <assert.h> class Date { public: Date(int year = 0,int month = 0,int day = 0) ...
2025-07-22
0
30
题解 | 日期差值
#include <iostream> using namespace std; #include<assert.h> class Date { public: Date(int year = 1,int month = 1,int day = 1) ...
2025-07-22
0
24
题解 | 计算日期到天数转换
#include <iostream> using namespace std; #include <assert.h> int GetMonthDay(int year, int month) { assert(month > 0 && month...
2025-07-22
0
24
题解 | #链表分割#
/* struct ListNode { int val; struct ListNode *next; ListNode(int x) : val(x), next(NULL) {} };*/ class Partition { public: ListNode* ...
2024-02-03
0
194
题解 | #链表中倒数第k个结点#
/** * struct ListNode { * int val; * struct ListNode *next; * }; */ /** * * @param pListHead ListNode类 * @param k int整型 * @return ListNod...
2024-02-01
0
151
题解 | #二分查找-I#
/** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param nums int整型一维数组 * @param numsLen int nums数组长度 * @param target int整型 * @return int整型 ...
2023-11-12
0
207
题解 | #旋转数组的最小数字#
/** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param nums int整型一维数组 * @param numsLen int nums数组长度 * @return int整型 */ int minNumberInRotate...
2023-10-09
0
221
题解 | #旋转数组的最小数字#
/** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param nums int整型一维数组 * @param numsLen int nums数组长度 * @return int整型 */ //定义两个指针,按情况走 int min...
2023-10-09
0
348
首页
上一页
1
2
3
4
下一页
末页