Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void DFS(int **a,int * used,int u,int n){
- If(used[v] == 1)return;
- Used[v] = 1;
- For(int I =0;I<n;I++){
- If(a[v][I] == 1)
- DFS(I);
- }
- }
- For(int I =0;I<n;I++){
- If(used[I] == 0)cout<<I;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement