Complexity?

#include <bits/stdc++.h>
using namespace std;

class graph{

map<int,list>l;
public:
void addedge(int u,int v){
l[u].push_back(v);
}

bool ishelper(int node,unordered_map<int,bool>&visited){
if(visited[node]==true){
return true;
}
visited[node]=true;
bool cycle=false;
for(auto neighbour:l[node]){
cycle=ishelper(neighbour,visited);
if(cycle){return true;}
}
visited[node]=false;
return false;
}

bool iscycle(){
unordered_map<int,bool>visited;
for(auto i:l){
visited[i.first]=false;
}
bool cycle=false;
for(auto i:l){
int node=i.first;
visited[node]=true;
for(auto neighbour:l[node]){
cycle=ishelper(neighbour,visited);
if(cycle){return true;}
}
visited[node]=false;
}
return false;
}

};

int main(){
graph g;
g.addedge(0,1);
g.addedge(1,2);
g.addedge(2,0);
// g.addedge(0,2);
// g.addedge(2,4);
if(g.iscycle()){
cout<<“YES\n”;
}else{
cout<<“NO\n”;
}
return 0;
}

What will be the space and time complexity?