this entire series is much much much better then so many paid courses.
@muzammilaltafmulla5 ай бұрын
You forgot 'very very' before those 'much'...
@thinkverse942 жыл бұрын
Thanks, Babbar bro for the superb explanation and your enthu :) Here just I wanna add a point, that is much easier to understand to detect loop:- // if the number of visited nodes in any adjacency list is >=2 then there is a cycle. // no need for extra parent data structure Sample code which passed all the test cases:- bool isCyclicBFS(int node, unordered_map &visited, unordered_map &adjList) { queue q; q.push(node); visited[node] = true; while(!q.empty()) { node = q.front(); // counter for already visited nodes int cnt = 0; //traversing the adjacency list for(int i: adjList[node]) { if(!visited[i]) { q.push(i); visited[i] = true; } else { cnt++; } } q.pop(the ); // if the number of visited nodes in any adjacency list is >=2 then there is a cycle. if(cnt >= 2) return true; } return false; }
@samsmith39612 жыл бұрын
how does it work i am not able to comprehend the concept used here , wont count be considered 0 everytime the loop makes another iteration
@thinkverse942 жыл бұрын
@@samsmith3961 very simple, if the number visited adjacent nodes >=2 for a node ... that means one is a parent and at least one node will be there which is visited but not a parent ... that's how you co-relate
@thinkverse942 жыл бұрын
@@samsmith3961 see the count is initialised 0 before calculating the adjacent nodes for a node, it will continue to count until all the adjacent are covered for a particular node, that's how we can track the number of visited adjacent nodes, and at the end we checking is it >= 2 or not
@hinalvakharia27442 жыл бұрын
will it work for DFS?
@KushalSharma-d3q Жыл бұрын
@@hinalvakharia2744if adj list has >=2 elements with visited==true that simply means it has a loop so its a condition for a loop whatever approach u go with
@shalinisaini378715 күн бұрын
Thankyou Bhaiya for this amazing course
@barnikroy52442 жыл бұрын
at least you kept your word to complete this course .........salute once more
@samsmith39612 жыл бұрын
yeh course kaafi underrated hai... i hope people would soon pay attention to a treasure trove of a channel like yours!!!! kudos to you and pls keep up the good work.
@hameedmulani21 Жыл бұрын
Its very good course with Complete Dry Run of Example that is what I want
@vaibhavrathod9674 Жыл бұрын
Finally I have watched this video 3 times, now I properly understand how this works.. Thank you so much Bhaiya...... Love you from Gujarat💖💖
@ShouryaPant2 жыл бұрын
Finaaly Our Beloved Babbar Bhaiyya Is Back Bass Ab Consistency Bhi Apnr Babaar Bhaiyya Ki phle jaise vapis Aajye Maza Aajayega🙂🙂🤩🤩
@AdityaRaj052 жыл бұрын
Sir provide complete notes 15-16 and from 41 to above also Ur notes is too good sir . Plz provide us so tat we can revise easily.
@crazykidda5831 Жыл бұрын
very nice lecture....I can't believe I could have understand all these when I started. But u are too good.
@darshanpatel913110 ай бұрын
bool isCyclicDFS(int node,int parent,unordered_map &visited,unordered_map &adj) Here why are we passing the adj list with pass by reference method ? Since there is no relation with the changing the values present in the adj list.
@muhammadsuleman8936 Жыл бұрын
Lecture was super amazing i recomment this playlist to everyone>> Amazing content zbr10
@vmstudy99655 ай бұрын
Bhaiya mjaa aa gya. Aisi dry run krk btaya kro 🎉❤. Ekdm chumeshwar tha 😅
@prashantbirajdar92712 жыл бұрын
bhut achaa ++ hai bhiya subkuch samaj ayaa nice bhaiya thanks..love u bhaiyaa....
@alexrcrew19752 жыл бұрын
-- --
@abhijeetbasfore68162 жыл бұрын
bhaiya BFS algo use jab apne kara parent ke liye different ds nhi banake queue ho jata na
@beinghappy92232 жыл бұрын
Thank u bhaiya Best video on Cycle Detection available on KZbin ❤
@shubhammalhotra7244 Жыл бұрын
For every visited vertex v, if there is an adjacent u. Such that u is already visited & u is not the parent of v. So, cycle in the graph is present/
@nishankdeep30842 жыл бұрын
thank you bhiaiya saare concept ache se clear hue bhaiya concept learn++
@ShivamGupta-qn7lj Жыл бұрын
We can also use vector adj, but it shows runtime error 16:25
@ankitchavhanАй бұрын
Well explained!! Just one feedback... Please highlight your mouse pointer with some color.
@jhordd522 жыл бұрын
bhaiyaa plzz video length badhado and good to see you back again just questions krvado bhaiya jese pehle topics mai krvaye hai baaki sab op hai aapke hmare liye itne efforts bhi kam nhi hai
@RohitSingh-hc8yi Жыл бұрын
loving this course bhaiya
@harshpandey4190 Жыл бұрын
Lecture is Amazing ++
@vishalgarna4580 Жыл бұрын
Samajh aaya gaya bhaiya
@rachit_joshi5 ай бұрын
Thank You So Much BHRATA SHREE !!!!!!!
@apoorvaron46 Жыл бұрын
for next time, Please do dry run with small examples
@syedmuhammadabdullah29206 ай бұрын
Thankyou so much for successfully wasting my time
@mancunianswagger36682 жыл бұрын
Finally video aayi ek❤ Daalo bhaiya daal do saari do mahine me placements hain krwaado tayaari fir mail me thankyou jarur bhejenge promise 🤞😅
@salmankhader1258 Жыл бұрын
plz discuss time and space complexity as well
@amitnagdev70612 жыл бұрын
In Simple Words, agar koi ek node k do 'mai-bap' mile toh samaj jana k voh ek cyclic component hai uss graph ka.😄
@barkhagupta523710 ай бұрын
😂😂😂😂I willl remember this logic @amitnagdev7061
@tayyab.sheikhАй бұрын
Point!
@mr.writer29037 ай бұрын
Now, i am realize just see whole logic and write code by yourself. it's possible that you find better code 🙃.
@slowDrive42 жыл бұрын
you can just use an extra set instead of object or dict
@vanshgoyal13562 жыл бұрын
Actually I've a doubt !! Here "src" is basically "i" and we are doing "q.push(src)" so are we considering that the graph will always contains a 0 as a vertex and will always run from 0 to V. Please correct me if I'm wrong. Thank you ❤❤
@sanipatel12722 жыл бұрын
Yes bro we are starting vertex from 0 to its value.
@anuragpandey81652 жыл бұрын
Boht achaa lecture........... par consistency chahiye babbar bhai
@GauravHaritas Жыл бұрын
bhaiya k editor ko bhi DSA aa gya gaya hoga ab tk to itni videos dekh dekh k
@utkarshsingh14572 жыл бұрын
Thanks for the video bhaiya... ❤️🔥
@bite091_jamee72 жыл бұрын
amazing bhaiya
@iamvishnuranjan2 жыл бұрын
Bhaiya plz end this course before placement 😭😭😭
@VivekSingh-xg5mn2 жыл бұрын
best videos on DSA and algo for sure on internet
@AmanKumar-io3ev7 ай бұрын
but bhaiya what will happen if nodes are not 1,2,3 despite of a ,b ,c
@subratamandal29246 ай бұрын
Yes in that case indexing will be a problem. You can do arr['a'-char] to store
@haiderali08012 жыл бұрын
amazing bhaiya......
@heighlights012 Жыл бұрын
bhai code kaha pe milega ye vala mera problem de raha code link mai sirf lec 44 tak hi hai
@Learnprogramming-q7f7 ай бұрын
Thank you Bhaiya
@PrakharSaini-zw8nz2 жыл бұрын
Thanx for this video and your unbeatable efforts..
@sounaksaha14552 жыл бұрын
maza aa gaya bhaiya
@SatyamKumar-x6m1l4 ай бұрын
sir eska code kaha hai jo link hai usma bass tree tk ka hi code haii graph aur bakki lecture ka code ka link kaha hai
@MrKalwar8 ай бұрын
bahut badhiya bhaiya!!
@footballcreativeeverywhere260 Жыл бұрын
Jai hind ❤️🇮🇳
@adityavishwakarrma5142 жыл бұрын
Ho jayega course complete complete++
@IndianGao2 жыл бұрын
are you fine bhaiya ji please notes bhi send kar dijiye 14-15 and 41 se aage ka
@apoorvyadav33782 жыл бұрын
Bhaiya is back 🔥🔥🔥
@shivkumar-og4ow2 жыл бұрын
thank you bhaiya .. for your hard work . Doing a good job
@KCOYASH Жыл бұрын
completed and thanks for the video
@SFAbhi96422 жыл бұрын
@Love Babbar bhaiya which keyboard do use for programming
@piyushkumar-wg8cv2 жыл бұрын
For better experience, watch in 1.25x speed. Meanwhile me who was already watching the video in 1.5x :- 🌝
@yutubegaming53405 ай бұрын
1.75
@alokranjan31852 жыл бұрын
Thanks bhaiya ,wait is over
@ks-xh4fq5 ай бұрын
Why parent of neighbour = front ? Line 24
@saujanyashukla54832 жыл бұрын
Good to see u back bhaiya keep the consistency up again ❤️
@itzheavem44512 жыл бұрын
last community post added last week he said we will be consistent now abhi es video mei bola hai ki 13 tarik k baad se consistent ho jayenge toh hisab sidha sa hai ab pehle wali baat nhi reh gyi hai course mei videos ki length v choti kr di gyi hai jabki feedback v diya tha last video mei. or padhane k style se pta lag rha hai wo pehle wale enthusiasm se nhi padhaya ja raha hai
@saujanyashukla54832 жыл бұрын
@@itzheavem4451 u are right bro
@grandson_f_phixis94805 ай бұрын
Thank you very much sir
@vishalgarna4580 Жыл бұрын
Acha nahi bahut accha 😊😊
@Deepak-um1zq Жыл бұрын
nice lectures❤
@tejasshaha66292 жыл бұрын
We trust you bhaiya ❤
@prashantaarya38522 жыл бұрын
awesome explanation
@akankshapandey97732 жыл бұрын
Thanku so much sir , sir pls series complete kr dijiye 2 month me placement hai pls sir 🙏
@jimarrafi58812 жыл бұрын
Bhai, Please make video on String Matching. It will be really helpful to us.
agle ne bol toh diya firse 13 tarikh k baad se consistent ho jayege. wese he jese har video mei bola jata h lekin 2 mahine se consistency ka koi tikhana nhi h
@raghavattri94492 жыл бұрын
Bhaiya new course ki announcement kab hogi😅
@chintaphaniramavaibhav37142 жыл бұрын
babar bhai please provide us with notes and code bhaiyya