Daa 8
Daa 8
#include <iostream> }
#include <vector>
auto start_time =
high_resolution_clock::now();
public:
this->V = V; duration_cast<microseconds>(stop_time -
adj.resize(V); start_time);
adj[u].push_back(v); };
int main() {
visited[v] = true; cout << "Execution Time Analysis of DFS" << endl;
cout << v << " "; cout << "Enter number of vertices: ";
cin >> V;
if (!visited[u]) {
} cin >> E;
cout << "Enter edges (u v):\n";
g.addEdge(u, v);
cout << "Nodes reachable from " << start << ": ";
g.reachableNodes(start);
return 0;