长青木
长青木
全部文章
分类
题解(3)
归档
标签
去牛客网
登录
/
注册
长青木的博客
全部文章
(共15篇)
题解 | #字符串变形#
//思路:首先创建一个新的字符串 //从后往前遍历s字符串,一旦碰到空格就将空格后面的字符存入到str字符串中 //依次往复,直到存放到最前面一个单词为止 //将最前面的单词存放进去 //最后将str拷贝到s中 //返回s即可 /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回...
2024-11-29
0
58
题解 | #旋转数组#
//把最后一个元素取出来存起来,随后让数组中的元素统一后移 //再将最后一个元素放到第一个位置,循环往复m次即可。 /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * 旋转数组 * @param n int整型 数组长度 * @param m i...
2024-11-29
0
33
题解 | #判断一个链表是否为回文结构#
/** * struct ListNode { * int val; * struct ListNode *next; * }; */ /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param head ListNode类 t...
2024-11-29
0
63
题解 | #链表内指定区间反转#
/** * struct ListNode { * int val; * struct ListNode *next; * }; */ /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param head ListNode类 ...
2024-11-15
0
76
题解 | #KiKi定义电子日历类#
#include <climits> #include <iostream> #include <limits> using namespace std; class Date { public: //构造函数 Date(int year=0,i...
2023-05-12
0
302
题解 | #牛牛的链表添加节点#
#include <stdio.h> #include <stdlib.h> //手撕链表 typedef int DateType; typedef struct List { DateType val; struct List* next; }LT; /...
2023-05-12
1
319
题解 | #牛牛的链表删除#
#include <stdio.h> #include <stdlib.h> //手撕链表 typedef int DateType; typedef struct List { DateType val; struct List* next; }LT; /...
2023-05-12
0
292
题解 | #牛牛的双链表求和#
#include <stdio.h> #include <stdlib.h> //手撕链表 typedef int DateType; typedef struct List { DateType val; struct List* next; }LT; /...
2023-05-12
0
352
题解 | #牛牛的链表交换#
#include <stdio.h> #include <stdlib.h> //手撕链表 typedef int DateType; typedef struct List { DateType val; struct List* next; }LT; /...
2023-05-12
0
283
题解 | #牛牛的单链表求和#
#include <stdio.h> //创建单链表 typedef int DateType; typedef struct PList { DateType val; struct PList* next; }ST; //创建节点 ST* CreateBayNod...
2023-05-12
0
307
首页
上一页
1
2
下一页
末页