Update dfs.c, dijkstra.c and tarjan.c