- Algorithms-Graph Traversals, BFS, DFS, Graph

Find all the Mother Vertices of a graph

  #include using namespace std;  void dfs_helper(int u,                vector& adj,                bool visited[]){    if (visited[u])        return;      visited[u] = true;      for (auto v : adj[u]) {        if (!visited[v])            dfs_helper(v, adj, visited);    }}  void getTransposeGraph(    vector&…

Read More

- Graph, TCS

Corona Virus | TCS Codevita 2020

  #include using namespace std;#define row 9#define col 20  void coronaVirus(char arr[row][col]){          char inverted[9][20];              char temp[9][20];          int count = 0;          int total = 0;          for (int i…

Read More