If You Like the Video then Plzz Consider Subscribing ☺. class Solution { public: void DFS(char u,unordered_map& adj,unordered_map& visited){ visited[u] = true; for(auto v: adj[u]){ if(visited[v] == false){ DFS(v,adj,visited); } } } int isCircle(vector &arr) { unordered_map adj; for(int i=0;i
If You Like the Video then Plzz Consider Subscribing ☺.
class Solution {
public:
void DFS(char u,unordered_map& adj,unordered_map& visited){
visited[u] = true;
for(auto v: adj[u]){
if(visited[v] == false){
DFS(v,adj,visited);
}
}
}
int isCircle(vector &arr) {
unordered_map adj;
for(int i=0;i