-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathdfs_adjacency_matrix.cpp
More file actions
56 lines (56 loc) · 1.03 KB
/
Copy pathdfs_adjacency_matrix.cpp
File metadata and controls
56 lines (56 loc) · 1.03 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
////
//// Created by hrith on 13-08-2019.
////
//
//#include <bits/stdc++.h>
//using namespace std;
//
//void print(int **adj,int n,int sv,bool *vis)
//{
// cout<<sv<<" ";
// vis[sv]=true;
// for(int i=0;i<n;i++)
// {
// if(adj[sv][i]==1)
// {
// if(vis[i])
// {
// continue;
// }
// else
// {
// print(adj,n,i,vis);
// }
// }
// }
//}
//int main()
//{
// int n,e;
// cin>>n>>e;
// int **adj=new int*[n];
// for(int i=0;i<n;i++)
// {
// adj[i]=new int[n];
// }
// for(int i=0;i<n;i++)
// {
// for(int j=0;j<n;j++)
// {
// adj[i][j]=0;
// }
// }
// for(int i=0;i<e;i++)
// {
// int x,y;
// cin>>x>>y;
// adj[x][y]=1;
// adj[y][x]=1;
// }
// bool *vis=new bool[n];
// for(int i=0;i<n;i++)
// {
// vis[i]=false;
// }
// print(adj,n,3,vis);
//}