mirror of
https://github.com/youngyangyang04/leetcode-master.git
synced 2025-07-06 15:09:40 +08:00
加头文件
This commit is contained in:
@ -564,6 +564,8 @@ if __name__ == "__main__":
|
||||
### C
|
||||
并查集方法一
|
||||
```c
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
// 定义边结构体,包含两个顶点vex1和vex2以及它们之间的权重val
|
||||
struct Edge
|
||||
@ -636,6 +638,9 @@ int main()
|
||||
```
|
||||
并查集方法二
|
||||
```c
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
// 定义边结构体,包含两个顶点vex1和vex2以及它们之间的权重val (略,同上)
|
||||
// 冒泡排序函数,用于按边的权重val不减序排序边数组(略,同上)
|
||||
|
||||
|
Reference in New Issue
Block a user