forked from ChaityaChheda/First-Open-Source-proclubvnit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
graph.c
40 lines (31 loc) · 786 Bytes
/
graph.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <limits.h>
#include <stdbool.h>
#include <assert.h>
#include <time.h>
typedef struct graph{
};
long ShortestPathLength(graph g, ...)
{
}
int main()
{
graph G;
G = readGraph();
// returns the shortest path from onr node to another
shortestPath = ShortestPathLength(G, ...);
//return a graph that is minimum spanning tree;
minimumSpanningTree = MinispanningTree(G);
//cycle detection return boolean, true if cycle exists and false otherwise
iscycle = checkCycle(G);
//check bipartite graph.
isbipartite = checkBipartite(G);
//the function should perform the topological sort
TopologicalSort(G);
//implement BFS DFS
bfs(G);
dfs(G);
return 0;
}