Closed ranisnehal closed 3 years ago
AlgoTree team will review your PR soon. Take Care of Few of the Things where most contributors are missing out. @ranisnehal :)
/ Here is the solution of the program in c++/
using namespace std;
class solution{ public:
bool solve(int src , vector<int> &vis, vector<int> &order,vector<int> adj[]){
vis[src]= 1;
order[src]= 1;
for(auto x:adj[src])
{
if(!vis[x])
{
bool conf = solve(x,vis,order,adj);
if(conf == true)
return true;
}
else if(order[x])
return true;
}
order[src] = 0;
return false;
}
bool iscyclic(int v,vector
time complexity:- O(v)
fixed issue #2056 and #2059 using c++
#
@ranisnehal
Related Issue
Describe the changes you've made
A clear and concise description of what you have done to successfully close your assigned issue. Any new files? or anything you feel to let us know!
Language Used:
[Mention the Language of Code]
Checklist: