Gemini_寒枫
Gemini_寒枫
全部文章
分类
归档
标签
去牛客网
登录
/
注册
Gemini_寒枫的博客
全部文章
(共12篇)
题解 | 滑动窗口的最大值
用栈写的 但是时间复杂度是o(n*size)不符合题目的o(n) class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param num int整型v...
2025-12-08
0
5
题解 | 链表相加(二)
/** * struct ListNode { * int val; * struct ListNode *next; * }; */ /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param head1 ListNode类 ...
2025-12-03
0
8
题解 | 两个链表的第一个公共结点
/** * struct ListNode { * int val; * struct ListNode *next; * }; */ /** * * @param pHead1 ListNode类 * @param pHead2 ListNode类 * @return L...
2025-12-03
0
11
题解 | 链表中环的入口结点
/** * struct ListNode { * int val; * struct ListNode *next; * }; */ /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param pHead ListNode类 ...
2025-12-03
0
8
题解 | 判断一个链表是否为回文结构
/** * struct ListNode { * int val; * struct ListNode *next; * }; */ /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param head ListNode类 t...
2025-12-02
0
8
题解 | 支付宝消费打折
#include <stdio.h> typedef struct { int jiage; int zhekou; float shijia; }po; int compare(const void*a,const void*b) { po* p1=...
2025-11-29
0
11
题解 | 小苯送礼物
#include <stdio.h> typedef struct { int i; int dianzan; int shoucang; int zhichili; }po; int compare(const void *a, const void...
2025-11-29
0
10
题解 | 分数线划定
#include <stdio.h> typedef struct { int bianhao; int fenshu; }po; int compare_fenshu(const void*a,const void*b) { ...
2025-11-29
0
9
题解 | 小红的回文串
#include <stdio.h> #include <string.h> //w,v,m,n,b,d,q,p,u void chaifen(char a, char* p) { int i = 0; while (p[i] != '\0') {...
2025-11-28
1
13
题解 | 买橘子
#include <stdio.h> int main() { int a; scanf("%d", &a) ; if((a%2==1)||(a<6)) { printf("-1");...
2025-11-19
1
18
首页
上一页
1
2
下一页
末页