bfs.h
来自「掌握如何用C来实现各种算法」· C头文件 代码 · 共 37 行
H
37 行
/*****************************************************************************
* *
* --------------------------------- bfs.h -------------------------------- *
* *
*****************************************************************************/
#ifndef BFS_H
#define BFS_H
#include "graph.h"
#include "list.h"
/*****************************************************************************
* *
* Define a structure for vertices in breadth-first search. *
* *
*****************************************************************************/
typedef struct BfsVertex_ {
void *data;
VertexColor color;
int hops;
} BfsVertex;
/*****************************************************************************
* *
* --------------------------- Public Interface --------------------------- *
* *
*****************************************************************************/
int bfs(Graph *graph, BfsVertex *start, List *hops);
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?