#include using namespace std;    void DFS(unordered_map& adj,          int node, vector& visited) {          if (visited[node])         return;             visited[node] = true;             for (auto x : adj[node]) {                     if (visited[x] == false)             DFS(adj, x, visited);     } }    int makeConnectedUtil(int N,                       int connections[][2],                       int M) {               vector visited(N, […]

Continue Reading