DFS Traversal Algorithm C source
#include #include #define STACK_SIZE 10 int push(int* stack, int* top, int value); int pop(int* stack, int *top, int *value); int Dfs(int (*dfs)[11], int* pred, int* r_stack, int* r_top); main() { int i,j, k; int temp; int dfs_array[10][11]={ {0, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1}, {0, 2, 3, 7, 9, -1, -1, -1, -1, -1, -1}, {0, 1, 4, 8, -1, -1, -1, -1, -1, -1, -1}, {0, 1, 4, 5, -1, -1, -1, -1,..
더보기