牛客410632071号
牛客410632071号
全部文章
分类
题解(16)
归档
标签
去牛客网
登录
/
注册
牛客410632071号的博客
全部文章
(共16篇)
题解 | #数组中的逆序对#c归并排序
/** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param data int整型一维数组 * @param dataLen int data数组长度 * @return int整型 * * C语言声明定义全局变量请加上stati...
C
数组
递归
归并排序
2022-04-14
0
393
题解 | #删除有序链表中重复的元素-II#
struct ListNode* deleteDuplicates(struct ListNode* head ) { // write code here if(head==NULL) return head; struct ListNode* H=mall...
C
链表
2022-04-08
2
359
题解 | #判断一个链表是否为回文结构#c快慢指针找中点,反转后半段链表对比
#include<stdbool.h> bool isPail(struct ListNode* head ) { if(head==NULL||head->next==NULL) return true; struct ListNode* H=malloc...
C
链表
2022-04-07
0
466
题解 | #链表的奇偶重排#c语言迭代
struct ListNode* oddEvenList(struct ListNode* head ) { // write code here if(head==NULL||head->next==NULL||head->next->next==NULL) ...
C
链表
2022-04-07
0
422
题解 | #单链表的排序#C语言归并排序递归+辅助数组法
归并排序递归 归并排序递归 辅助数组法 struct ListNode* mid(struct ListNode* head);//中点分割函数 struct ListNode* merge(struct ListNode* head1,struct ListNode* head2);/...
C
链表
递归
归并排序
2022-04-07
0
563
题解 | #两个链表的第一个公共结点#c快慢指针
/** * struct ListNode { * int val; * struct ListNode *next; * }; * * C语言声明定义全局变量请加上static,防止重复定义 */ /** * * @param pHead1 ListNode类 * @pa...
C
链表
2022-04-06
0
415
题解 | #删除链表的倒数第n个节点#C快慢指针法
/** * struct ListNode { * int val; * struct ListNode *next; * }; * * C语言声明定义全局变量请加上static,防止重复定义 */ /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可...
C
链表
2022-04-06
1
433
题解 | #链表中倒数最后k个结点#C快慢指针
/** * struct ListNode { * int val; * struct ListNode *next; * }; * * C语言声明定义全局变量请加上static,防止重复定义 */ /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可...
C
链表
2022-04-06
0
481
题解 | #链表相加(二)# C头插法反转链表后相加值赋予头插法创建新链表
* struct ListNode { * int val; * struct ListNode *next; * }; * * C语言声明定义全局变量请加上static,防止重复定义 */ /** * * @param head1 ListNode类 * @param he...
C
链表
2022-04-06
0
471
题解 | #链表中环的入口结点#C语言 哈希表法
哈希表 #include<stdbool.h> #define base 769 typedef struct ListNode datatype; struct hashlist { datatype key; struct hashlist* Next; }; ty...
C
链表
哈希表
2022-04-05
0
425
首页
上一页
1
2
下一页
末页