From 9d8486ad9fa12f5f9ceb48c1c589c8fdf1cf5f4e Mon Sep 17 00:00:00 2001 From: Mohit Singh Date: Mon, 11 Feb 2019 00:30:09 +0530 Subject: [PATCH] Create DFS --- Depth First Search/DFS.c | 64 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 Depth First Search/DFS.c diff --git a/Depth First Search/DFS.c b/Depth First Search/DFS.c new file mode 100644 index 0000000..c7ae35a --- /dev/null +++ b/Depth First Search/DFS.c @@ -0,0 +1,64 @@ +#include +#include +#define MAX 10 +void dfs(int graph[][MAX],int visit[],int n,int start) +{ + visit[start]=1; + int i; + printf("%d ",start); + for(i=0;i