陪我吹吹海风吧
陪我吹吹海风吧
全部文章
分类
归档
标签
去牛客网
登录
/
注册
陪我吹吹海风吧的博客
全部文章
(共22篇)
题解 | #二分查找-I#
/** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param nums int整型一维数组 * @param numsLen int nums数组长度 * @param target int整型 * @return int整型 ...
2024-05-08
0
161
题解 | #岛屿数量#
void dfs(char** grid, int gridRowLen, int gridColLen, int x, int y) { // 判断当前坐标是否在矩阵范围内 if (x < 0 || x >= gridRowLen || y < 0 || y &g...
2024-05-07
0
157
题解 | #【模板】单源最短路1#
#include <stdio.h> #include <stdlib.h> #include <string.h> #define MAX_NODES 5009 // 定义邻接表节点 typedef struct Node { int vertex;...
2024-05-03
1
173
题解 | #【模板】堆#
#include <stdio.h> #define MAX_SIZE 100005 // 最大堆的大小 // 定义大根堆的数组和大小 int heap[MAX_SIZE], size = 0; // 交换两个整数 void swap(int* a, int* b) { i...
2024-04-22
0
249
题解 | #从中序与后序遍历序列构造二叉树#
/** * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * }; */ /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * ...
2024-04-21
0
192
题解 | #实现二叉树先序,中序和后序遍历#
/** * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * }; */ /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * ...
2024-04-19
0
189
题解 | #牛牛的单向链表#
#include <stdio.h> #include <stdlib.h> typedef struct Node{ int data; struct Node* next; } Node; Node* creactNode(int data){ ...
2024-04-17
0
155
题解 | #【模板】单源最短路2#
#include <limits.h> #include <malloc.h> #include <stdio.h> #define MAX 5000 int main() { int n, m; scanf("%d %d"...
2024-03-20
0
199
题解 | #最小生成树#
#include <stdio.h> #include <stdbool.h> #include <stdlib.h> #include <limits.h> // 定义边的结构体 struct Edge { int src, dest, w...
2023-12-29
0
227
题解 | #【模板】拓扑排序#
#include <stdio.h> #include <stdlib.h> #define MAX_NODES 200000 struct Node { int value; struct Node* next; }; struct Graph { ...
2023-12-28
0
243
首页
上一页
1
2
3
下一页
末页