Always felt ghosted by graphs, but your explanation is so simple and easy, i am getting some confidence in graphs now. Really excited for future videos. Thanks a lot💛
Luv bhai aap best teacher ho mujhe Graph ka kuch bhi samajh nhi aata tha, Now I love graph and its problems and ab problems bhi samajh aa rhi hain DFS related and please Trees ka bhi kuch kro
Bhaiya kasam se bohot maza aa rha hai ab padhne mein thank you very much bhaiya ho sake toh wapas se youtube pe active ho jao aur hume aur chize sikhao. 💛
Hey, luv ❤ you are doing great job. One of my suggestion is please include more questions in video which was asked in coding test rather then in interveiw. ✌✌
Bro - You are giving great and easy explanation. I wanted to refer it to few of my US follows but they cannot understand Hindi :(. I would urge you to prepare them in english as well. Excellet teaching!
After watching this amazing video on DFS how easily you explain step by step i can't control myself for subscribe your channel for such amazing video .superb 💛*💯
Bhai Meri job abhi shuru Hui hai.... Lakin Mai satisfied nhi hu to aur prepare kar RHA hu 10 din sai ds dekhna bnd Kar rakha tha aaj Kunal aur striver ka mic drop challenge dekh Kar aaya aur ab apka graph series dekh rha hu
hello bro i've doubt we can ignore that isloopexists variable since we are already returning true when we find loop so at that point it directly jump out of that function. please correct me if I'm wrong
Luv Sir -> King of CP 👑
everyone else explain just code,
but u explain the approach to write the code. Thanks a lot💛💛
Always felt ghosted by graphs, but your explanation is so simple and easy, i am getting some confidence in graphs now. Really excited for future videos. Thanks a lot💛
Literally I learned a lots from you 🧡
You explained as we solve the question🙌💛
Luv bhai aap best teacher ho mujhe Graph ka kuch bhi samajh nhi aata tha, Now I love graph and its problems and ab problems bhi samajh aa rhi hain DFS related and please Trees ka bhi kuch kro
Never thought graph could be this easy to code 💛🔥🔥🔥🔥
aap dfs itna acha padhai ki ye aap batane ke pehle hi solve hogaya
watching every single video you made !!! Thank you !😄
bro i think u should make a video on how to traverse a 2d graph and find some path with dfs. this topic seems quite hard for us.
Bhaiya kasam se bohot maza aa rha hai ab padhne mein thank you very much bhaiya ho sake toh wapas se youtube pe active ho jao aur hume aur chize sikhao. 💛
luv ur videos bro cant wait to learn a whole lot of cp from u
Hey, luv ❤ you are doing great job. One of my suggestion is please include more questions in video which was asked in coding test rather then in interveiw. ✌✌
you are best teacher sir
Congrates for 90k
Great Explanation Thank you !!💛
Thank you so much bro your channel is underrated.
💛 Learning a lot bhaiya 💛
Aag lga di bhai 🔥
Very impressive teaching style. Thanks!!💛
Thank you Bhaiya ❤️💕
brother you are awesome for me. I learned lot of from you.
you made it look so easy
💛💛
Great video 💛
take love from BD
💛Thank you so much
Bro - You are giving great and easy explanation. I wanted to refer it to few of my US follows but they cannot understand Hindi :(. I would urge you to prepare them in english as well. Excellet teaching!
Us wale logo ko bolo Hindi me videos banaye pehle kyuki Hume English ni aati acche se samajh
cout
thank you so much ...i just found the perfect playlist
great lecture
Bhaiya how to find size of graph in the code for graph that you have written?
thanks for this amazing content.💛
After watching this amazing video on DFS how easily you explain step by step i can't control myself for subscribe your channel for such amazing video .superb 💛*💯
Love you bhaiya 💗
Thanks Man !!! 🐺
Thanks bhaiya💜 crystal clear😁
This is amazing ❤️
U are really genius bro.
Bhai Meri job abhi shuru Hui hai.... Lakin Mai satisfied nhi hu to aur prepare kar RHA hu 10 din sai ds dekhna bnd Kar rakha tha aaj Kunal aur striver ka mic drop challenge dekh Kar aaya aur ab apka graph series dekh rha hu
awesome video as always :).
By when will the whole cp course be finished?
where you updated the parent...?
Sir aap konsa softwate use krte ho highlight krne ke liye jo apne aap highlight hone ke baad mit jata h
loved this video
If we do not use isLoopExists|=dfs(child,vertex) what will happen for return value??
Thanks a lot💛
part 1
#include
using namespace std;
const int N=1e5+10;
vectorg[N];
vector cc;
vector current_cc;
bool vis[N];
void dfs(int vertex)
{
/*Take action after entering the vertex*/
//cout
Can you show for directed graph?
Amazing 💛💛
thank you very much sir
Thanks !💛💛
thanks💛💛
hello bro i've doubt we can ignore that isloopexists variable since we are already returning true when we find loop so at that point it directly jump out of that function. please correct me if I'm wrong
sir i love your videos , sir please cover other graph algo like topological sort,.....
Best
Thanx bhaiya
''yellow heart with little blood and full of luv"
sir , please code bhi upload kar diya karo ..
usse hame kafi help milti hai 🙏🙏🙏🙏🙏🙏🙏🙏🙏
i don’t do it intentionally because otherwise people will just copy paste from there, i want people to write themselves
@@iamluv ❤️
Bhaiya 390 questions ho gaye Leetcode p...ab koi chance h Elon Musk ko harane ka🙄
bas thoda sa or :)
@@HemantBEE aap bolte ho to aisa hi hoga 🙂
bhia segment tree bhi padaoge kya?
If 0 is a node, then shouldnt the parent of the first node ( on which we apply dfs ) be anything other than 0 ?
Should be something that is not present in the given vertices
Like preferably -1 if all the vertices are positive.
Thankyou !!!!!
Bhaiya bahut din se contest organise nai kiye...contest4 organise kab kar rehe ho?
yaar mushkil hai. i dot have time to make a contest, nor anyone who can help in making contest
@@iamluv okay bhaiya I get it...graphs and trees ke baad overall ek contest kardena...
Bdw love your videos😄
Why did the loop runs from 1 to n?
Because bro we are checking if that node is visited then we have no need to traverse that component
thanks bro
STL PURA COMPLETE HO GYA HAI KYA ?
Haan bro
@@mitanshu2011 achha tq bro
Maza aaya
bhaiya ek baar how to find number of cycles in a graph batado😭😭 💛💛💛💛
code should also include the case where graph is not connected and hence we will combine the previous code in the same video
💛
are u reading my comment 😅
please cycle detection of directed graph
💛
💞💛💛💛💛💛💛💛💛💛💛💛💛💛
In the title, it should be mentioned that it's for an Undirected Graph.
yellow heart
❤️
nice'
💛💛💛
❤❤❤❤❤
#include
using namespace std;
const int N=1e3;
vector graph[N];
bool visited[N];
bool dfs(int vertex,int parent){
visited[vertex]=true;
bool isloopexist=false;
for(auto child:graph[vertex]){
if((visited[child]) && (child==vertex))continue;// check for self-loop
if(visited[child]) return true;
isloopexist |= dfs(child,vertex);
}
return isloopexist;
}
int main(){
int n,m;
cin>>n>>m;
while(m--){
int v1,v2;
cin>>v1>>v2;
graph[v1].push_back(v2);
graph[v2].push_back(v1);
}
bool cycle=false;
for(int i=1;i
💛💛💛💛💛
💛💛💛💛💛💛
💛💛💛💛💛💛💛💛💛💛
8-aug 2022
thanks a lot💛
Thanks broo
💛
💛💛💛💛
💛💛💛💛💛💛
💛💛
❤
💛💛💛💛💛💛💛💛💛💛
💛
💛💛
💛💛💛💛💛
💛💛💛💛💛💛💛💛
❤️💛
💛💛
💛💛💛💛