Lecture 98: Bridges in a Graph || C++ Placement Series

  Рет қаралды 73,737

CodeHelp - by Babbar

CodeHelp - by Babbar

Күн бұрын

Пікірлер: 141
@rajat_singla
@rajat_singla 2 жыл бұрын
We can avoid using vis[] array. If (disc[node] !=-1), it indicates that the node is visited. So we can use this condition instead.
@jatingarg1897
@jatingarg1897 2 жыл бұрын
After a good series of topics, there comes a frustrating one. 😂
@chiragPatel22c
@chiragPatel22c Жыл бұрын
totally agreed!! mene do tin video dekhe but yaha aake samaj aya concept!
@itsaayush7357
@itsaayush7357 Жыл бұрын
Frustrating nahi h yar...ajeeb he he. Bhot he weird
@muhammadsuleman8936
@muhammadsuleman8936 Жыл бұрын
Exactly.. @@itsaayush7357
@CE073_lakshkyada
@CE073_lakshkyada 8 ай бұрын
Sahi kaha bhai puri series me 1 bhi topic aisa nahi thaa to hard laga Lekin isme thoda problem aa raha he 😂
@vmstudy9965
@vmstudy9965 5 ай бұрын
Sach me broh... G@*D ftt gyi bhai🥲
@kishanprajapati3327
@kishanprajapati3327 2 жыл бұрын
Thanks Bhaiya to continuing DSA series i know it's hard to do lots of work and getting 2-3k views but still you are doing free for us. I have no complain why you have to started teaching on Unacademy.
@sanyadoda6725
@sanyadoda6725 7 ай бұрын
14:00 is graph mein do bridges ho sakte hain , 0-3 bhi ek bridge ho sakta hai . kyunki low[neighbour] that is 3 >disc[node] which is 0. and 0-4 toh bhaiya ne bata hi diya
@nishaanand6460
@nishaanand6460 2 ай бұрын
saw other channels.. but so far.. this video made me understand this concept best!
@varun_immadisetti
@varun_immadisetti Ай бұрын
Bhai, it took me around 2 hours to understand how exactly it is working. I have made dry run and finally understood this clearly. Thank you for this video.
@Ballistic_Bytes
@Ballistic_Bytes 2 жыл бұрын
Thoda mushkil hua samajhne mein but aakhir mein aa gaya samahj. Thanks a lot bhai.
@sukhjitsingh959
@sukhjitsingh959 2 жыл бұрын
Babbar sir you are speaking very fast and then facing problem to understand some content while discussing approach..I visited vedio again...and again while discussing disc time and low possible time while updating when you found neck edge ...you are doing very well in all vedio thanks
@prashantbirajdar9271
@prashantbirajdar9271 2 жыл бұрын
haa bhai thoda fast vo gya aur concept bhi puri tarah samja nhi 80% samaj aya phir bhi code samaj ayaa thanku bhaiyaa
@skchoudhary7956
@skchoudhary7956 2 жыл бұрын
Consistency back on track👌...quality of content💯...Energy😐 dikh rha h load kaafi le rakha h....
@sagarchaddha2637
@sagarchaddha2637 2 жыл бұрын
we can use timer-1 instead of desc array that will reduce space complexity.
@sal2054
@sal2054 2 жыл бұрын
But it would remain O(n) only :)
@raghavjuneha148
@raghavjuneha148 6 ай бұрын
Why low[2] was updated to 0 and not to 1? I mean since the distance between 0 and 2 should be equaivaent to 1
@mridul.7183
@mridul.7183 Жыл бұрын
when we checked for bridge condition for 0 and 3 we ignorred as 0 was parent of 3. then why didnt we ignore 3 and 4 where 3 is also parent of 4?
@prayagpatel9136
@prayagpatel9136 2 жыл бұрын
why dont we update low[node] with min(low[node],disc[neigh]+1)......bcz coming fro neighbour to node will require one unit time?
@anuragpandey8165
@anuragpandey8165 2 жыл бұрын
exactly....
@skyquake._
@skyquake._ 2 жыл бұрын
I was about to ask.
@prabhatmishra5667
@prabhatmishra5667 2 жыл бұрын
Dry run it with examples. You seem to be confused here
@avronilbanerjee5302
@avronilbanerjee5302 2 жыл бұрын
kzbin.info/www/bejne/eaSqgZKplJh6jck Watch this
@pareekshithachar3788
@pareekshithachar3788 2 жыл бұрын
did you understand why> even im confused
@VishalGupta-xw2rp
@VishalGupta-xw2rp 2 жыл бұрын
Congratulations for 1.5L Subscribers 🔥🌠🎉🎊. It's because of your such Quality content, this playlist will the best list for DSA.
@Leerical-p9s
@Leerical-p9s 2 жыл бұрын
Good lecture keep it up. It will help a lot who want to learn and apply problem solving. # graph finished 😀☺️☺️
@ayushgoyal9871
@ayushgoyal9871 Жыл бұрын
In gfg it is accepting for low[nbr] instead of disc[nbr] for back edge case
@hardikjain-brb
@hardikjain-brb 11 ай бұрын
Got accepted for both in leetcode. God knows what is happening and why it does not matter what to use disc or low
@asdsd-wu4yw
@asdsd-wu4yw Жыл бұрын
best explanation throughout the web i checked almost all resources this is one of the best explanation ❤❤❤
@Rushikesh_Khaire
@Rushikesh_Khaire Жыл бұрын
I have a quetion in which condtion the code will be returning back... I dont understand and without "return" keyword it is possible ?
@rawat_ji5183
@rawat_ji5183 2 жыл бұрын
perfect explanation bhiya 😁😁😁 easily samaj aa gaya hard problem
@adityauniyal8632
@adityauniyal8632 Жыл бұрын
Me too😁
@ankitkumarpathak6768
@ankitkumarpathak6768 2 жыл бұрын
you can use low[node]=min(low[e],low[node]); on both where updation is needed (from child or at the time of back edge found);
@vishalsnsingh
@vishalsnsingh Жыл бұрын
at the time of back edge
@neilsancheti2473
@neilsancheti2473 2 жыл бұрын
Thank you so much sir for this bestest content♥️ having such a strong feeling about getting placed. I am a mech student trying for a software job. Definitely bit difficult bt thia course is such a confidence 💯💯
@peterpace3379
@peterpace3379 2 жыл бұрын
Have you made any projects yet?
@neilsancheti2473
@neilsancheti2473 2 жыл бұрын
@@peterpace3379 yes its un the making
@kashishjain8133
@kashishjain8133 2 жыл бұрын
Thanku so much for such a great series Consistency++ Josh++ Present ✋
@KhushiKavya-py1yj
@KhushiKavya-py1yj 3 ай бұрын
smjh ni aya pr will come back again, 1st vdo for today
@sharatpaul
@sharatpaul 2 жыл бұрын
Your teaching technique is great , just one suggestion if you can pease use RED pen when you explain things like moving from node to node or removing an edge because if you use other color pens like WHITE or YELLOW ,sometimes it overlaps with existing lines and difficult to catch quickly with our eyes. This will be really helpful in quickly understanding what you teach.
@naveengupta4514
@naveengupta4514 25 күн бұрын
sach me bahut ganda explain kia :)
@luckydewangan5985
@luckydewangan5985 Жыл бұрын
ye vala video upar se kyu ja raha hai ? abhi tak toh sab samjh me aa raha tha. Is vaale video me bhaiya ne dry run karte time hadbadi me sab kuch samjhaya hai. Although 3-4 examples run karke khud se samjh me aa gaya. 😎😎
@abhishekanand7154
@abhishekanand7154 2 жыл бұрын
0-3 can be bridge too, correct?
@princhipawansaikia
@princhipawansaikia 2 жыл бұрын
Yes
@the-gr8-eye
@the-gr8-eye 11 ай бұрын
yes, i think so
@vortexdeo4545
@vortexdeo4545 2 жыл бұрын
8:40 ye sequence kya hai, 0->1->2->0 fir wapas 2 to 1, fir ek baar 2->0 back edge, 2->1 bridge check, 0-1> bridge check....❓ Isme dfs recursion khud hi karna padega
@VishalGupta-xw2rp
@VishalGupta-xw2rp 2 жыл бұрын
I'm with you bhai... This playlist is just awesome 🤩🔥
@ayushraj6525
@ayushraj6525 2 жыл бұрын
I think there is a slight mistake in the low array, the low[1] should be 0 because we have to update the value during backtrack.Correct me if I m wrong.
@luckydewangan5985
@luckydewangan5985 Жыл бұрын
low[1] can't be 0, because we can take low of any adjacent node except parent and 0 is parent of 1 so we can't consider it's low.
@miss_anonymous16
@miss_anonymous16 2 жыл бұрын
Attendence!! Bro is back with amazing videos...
@itskaaryan7
@itskaaryan7 Жыл бұрын
I did not get the backedge part when we are returning why for 1 also low will become 0 and also for 2 it is 0 ..how is it done..can anyone explain me.
@focus.placement5589
@focus.placement5589 2 жыл бұрын
2 baar dekha sab clear thankss bhaiya
@dwivedi6037
@dwivedi6037 2 жыл бұрын
Test me best @Babbar Bhaiya is Always best
@artyCrafty4564
@artyCrafty4564 11 ай бұрын
thanxx bhaiya 😀 You made it just clear
@shivendramaurya7585
@shivendramaurya7585 Жыл бұрын
Little bit tough😮
@imransjourney
@imransjourney 4 ай бұрын
Bhai, normally talks in 1.25x speed...❤‍🔥
@arbhavchouhan8310
@arbhavchouhan8310 2 жыл бұрын
very nice bhaiya ,keep it up ,we are also making full efforts...
@rohitmittal9061
@rohitmittal9061 2 жыл бұрын
bhaiya aap next level smjha rahe ho har ek concept ko,, thank you very much itna acha content dene ke liye ,, bhaiya ek cheez puchni thi ki ye series khatam kab tak ho jayegi ??
@TechUprise-by-Jyoti
@TechUprise-by-Jyoti 2 жыл бұрын
Thank you bhaiya. Consistency OP. 😊😇✨
@muskangarg9011
@muskangarg9011 2 жыл бұрын
your way of explaining is very nice !! helped a lot ❤
@B-NikhilRichhariya
@B-NikhilRichhariya 11 ай бұрын
aa gaya at last smjh !
@KACodes
@KACodes 2 жыл бұрын
Bhaiya vapis aa gaye.....burrrah 🤟
@PrajwalRaut
@PrajwalRaut 2 жыл бұрын
The real consistency is here ✨ you are awesome bhaiya ✨
@keshavarya5999
@keshavarya5999 2 жыл бұрын
Ye channel khatarnak hota ja raha hai DSA busted indeed
@awesomepatt620
@awesomepatt620 2 жыл бұрын
Thank you for this amazing series bhaiya 🤩
@piyushgaur6975
@piyushgaur6975 2 жыл бұрын
bhaiya thank u smjhaaney k liye, But kuch smjh nhi aaya mjaa nhi aaya ....
@RahulKumar-wt9qc
@RahulKumar-wt9qc 2 жыл бұрын
Sahi bola bhai
@dEviL_bIsWaJiT
@dEviL_bIsWaJiT 2 жыл бұрын
Thanks a lot for this awesome series bhaiya❤️🔥
@RohitSingh-hc8yi
@RohitSingh-hc8yi Жыл бұрын
loving your videos
@dainaetishaa5006
@dainaetishaa5006 2 жыл бұрын
We always support you vaiya ..thank you always 😊😊😊
@jaydwarkadhish959
@jaydwarkadhish959 2 жыл бұрын
Sir amazing video
@unboxtheuniverse5336
@unboxtheuniverse5336 2 жыл бұрын
I know if you are consistent I will Consistent automatically 😃😃❤️
@skyquake._
@skyquake._ 2 жыл бұрын
#include #include void dfs(int node, int parent, vector &discT, vector &low, unordered_map< int, bool > &visited, vector &result, unordered_map &adj, int &timer) { visited[node] = true; discT[node] = low[node] = timer++; for(auto neighbour : adj[node]) { if(neighbour == parent) { continue; } if(!visited[neighbour]) { dfs(neighbour, node, discT, low, visited, result, adj, timer); low[node] =min(low[node], low[neighbour]); if(low[neighbour] > discT[node]) { vector ans; ans.push_back(node); ans.push_back(neighbour); result.push_back(ans); } } else { low[node] = min(low[node], discT[neighbour]); } } } vector findBridges(vector &edges, int v, int e) { unordered_map adj; for(int i = 0; i visited; //Initialize for(int i = 0; i
@vivan1852
@vivan1852 2 жыл бұрын
Present , thank you bhaiya
@aashishrangdal9614
@aashishrangdal9614 2 жыл бұрын
Bhaiyyaa Discord pr hr sunday mentor session rakho na..!!😶😶
@anuragraut5101
@anuragraut5101 2 жыл бұрын
samaj gaya
@Reehan
@Reehan 2 жыл бұрын
aap bhagwan ka kaam kar rhe hai keep doing it❤️
@amitavaghosh7201
@amitavaghosh7201 2 жыл бұрын
Going to hit 100 videos can't imagine....
@amitavaghosh7201
@amitavaghosh7201 2 жыл бұрын
Even after less views
@nikhilverma7045
@nikhilverma7045 2 жыл бұрын
Hats off to you 🫡🫡
@kshitijraj1320
@kshitijraj1320 2 жыл бұрын
Thank you bhaiya ❤❤
@muskanchhabra4929
@muskanchhabra4929 Жыл бұрын
thanks bhai for this expakaneatuib
@imran_7862
@imran_7862 Жыл бұрын
Samajh me nahi aaya... Reason: Too lengthy code, that's why it is very difficult to understand each and every steps...
@Adarshsharma-xg1ft
@Adarshsharma-xg1ft 2 жыл бұрын
Bhai please also do some more related questions in the video
@niteshchoudhary7705
@niteshchoudhary7705 Жыл бұрын
lysm bhaiya u are best :-)
@hollywoodmovies1094
@hollywoodmovies1094 2 жыл бұрын
keep it up..loving it🥳
@RohitSingh-hc8yi
@RohitSingh-hc8yi Жыл бұрын
thaank you bhaiya
@paarthpatel861
@paarthpatel861 2 жыл бұрын
Bhaiya Shanti sa video banoo Time lagta ha to lag na do but energy ho ni chaiya Jo phele Jo banata tha👍🏻👍🏻Or aapka jasa dedicated video koi nai banata 👍🏻👍🏻🔥🔥
@UdayKumar-gu2sg
@UdayKumar-gu2sg 2 жыл бұрын
Bhaiyya written notes update kardo bhaiya please🙏🙏🙏🙏🙏
@engg.5111
@engg.5111 2 жыл бұрын
🔥🔥💥💥best course
@umangkumar2005
@umangkumar2005 Жыл бұрын
ye tough ha abhi tak ka
@chandradevkushwah932
@chandradevkushwah932 Жыл бұрын
thank you
@harikrushnasuhagiya3925
@harikrushnasuhagiya3925 2 жыл бұрын
thank you bhaiya
@K_EC_SakshamSingh
@K_EC_SakshamSingh 2 жыл бұрын
Bhaiya dynamic programming kab se shuru hogi ???
@mysticmuskan3529
@mysticmuskan3529 Жыл бұрын
Thanks
@bhushannalawade4120
@bhushannalawade4120 2 жыл бұрын
Bahiya course khatam kab hone wala hai apne March ki deadline dei thi
@Oroniislam-l6o
@Oroniislam-l6o 2 жыл бұрын
Love you vaia💖💖💖
@laxmankumawat6728
@laxmankumawat6728 2 жыл бұрын
Okay 👍
@akankshapandey9773
@akankshapandey9773 2 жыл бұрын
Thanku sir 🙏🏻
@user-em7cy3cc5x
@user-em7cy3cc5x 6 ай бұрын
isme parent kyu liye jab koi kaam nhi tha tooh? koi samjha do
@yogeshsharma24
@yogeshsharma24 2 жыл бұрын
Bhaiya time management pe video main channel pe pls request
@fazerugbrug439
@fazerugbrug439 2 жыл бұрын
josh is super high
@nitinchandel4786
@nitinchandel4786 2 жыл бұрын
Thanku bhiayya
@beingoutofthebox8906
@beingoutofthebox8906 2 жыл бұрын
Thoda sah samjha aaya I think aur ek dobar video dekhna padega
@inspiringzone12
@inspiringzone12 2 жыл бұрын
Consistently+++
@adityakeshari2295
@adityakeshari2295 2 жыл бұрын
Understood
@GuruPrasadShukla
@GuruPrasadShukla 2 жыл бұрын
marking my attendence
@shivamdubey3798
@shivamdubey3798 2 жыл бұрын
Bhaiya please make a video DBMS
@reygamingyt8007
@reygamingyt8007 2 жыл бұрын
Ye series aur kitne dino me khtm ho jygi ..??
@Animesh_SGIS
@Animesh_SGIS 2 жыл бұрын
In place of timer++ can we pass 'node' in function dfs ? If no ,can someone reply me why?(it will be much help)
@acxd
@acxd Жыл бұрын
Low wale array ka significance clear nahi hua
@usernamewhatsoever4557
@usernamewhatsoever4557 Жыл бұрын
maine agar aisa course bnaya hota to m free me na deta aisi audience ko jo acknowledge bhi na kare
@9-1939
@9-1939 Жыл бұрын
🔥👌
@RajKumar-vq1nm
@RajKumar-vq1nm 2 жыл бұрын
❤️
@Pikachu10-19
@Pikachu10-19 2 жыл бұрын
Attendence++
@PriyankPatel-k5d
@PriyankPatel-k5d 25 күн бұрын
not good explaination too speedy explaination
@vishuyadav9767
@vishuyadav9767 2 жыл бұрын
samjh nhi aaya speed thodi thej thi explain krne ki and concept shi se nhi smjh paya
@abhishekgamer6097
@abhishekgamer6097 2 жыл бұрын
First comment ❤️
@deepakagrawal7687
@deepakagrawal7687 Жыл бұрын
Sorry bro, disliking your video because didn't find your explanation or teaching of this video that good.
@bhushannalawade4120
@bhushannalawade4120 2 жыл бұрын
Love+++++
Lecture 99: Articulation Points in Graphs || C++ Placement Series
29:52
CodeHelp - by Babbar
Рет қаралды 51 М.
Real Man relocate to Remote Controlled Car 👨🏻➡️🚙🕹️ #builderc
00:24
Lecture 101: Bellman Ford Algorithm || C++ Placement Series
22:06
CodeHelp - by Babbar
Рет қаралды 68 М.
6.12 Bridges(Cut Edge) in a Graph | Find All Bridges in a Graph | Graph Theory
20:54
Find Bridges in a graph using Tarjans Algorithm | Cut Edge
23:27
DRM explained - How Netflix prevents you from downloading videos?
18:17
Mehul - Codedamn
Рет қаралды 224 М.
Lecture 83: N-Queen Problem || Backtracking Day 2 || C++ Placement Series
31:04
CodeHelp - by Babbar
Рет қаралды 121 М.
Lecture 95: Dijkstra's Algorithm || C++ Placement Series
35:55
CodeHelp - by Babbar
Рет қаралды 158 М.