BFS Traversal in Graph | DFS Traversal in Graph

  Рет қаралды 29,828

Coder Army

Coder Army

Күн бұрын

Пікірлер: 154
@pranaypaul6361
@pranaypaul6361 8 ай бұрын
Your lecture is like DFS...go core and core until nothing left to explore. Amazing clarify on build blocks of everything!!
@sumitvishwakarma1075
@sumitvishwakarma1075 8 ай бұрын
Bhaiya providing every knowledge of DSA totally free which you can't also get in high paid DSA courses Hats off to you Bhaiya😇😇❤❤
@dealseasy363
@dealseasy363 8 ай бұрын
Lecture Before Breakfast... As always Well Explained.👍
@hiteshsharma5034
@hiteshsharma5034 8 ай бұрын
🎉🎉🎉🎉 Missing your lectures due to exams🥲 restarting soon
@OK-ku8ez
@OK-ku8ez 6 ай бұрын
DFS traversal using stack : DS used : 1) Stack for storing the nodes to be explored 2) Vector for storing next indexes to be explored (Also for checking visited or unvisited node) vector dfsOfGraph(int V, vector adj[]) { vectorans; vectorexploreIndex(V,-1); stackst; ans.push_back(0); exploreIndex[0]=0; st.push(0); while(!st.empty()) { //take out the node int node=st.top(); //take out the index for exploration int j=exploreIndex[node]; //explore while(j
@newglobal7271
@newglobal7271 8 ай бұрын
This is the best course i can say , Thank You Rohit Bhaiya ❤❤❤🙏🙏🙏
@vivek-he5ry
@vivek-he5ry 8 ай бұрын
day 3/60 ✅ Excellent Explanation Bhaiya... example of corona was really helpful. 😀
@nidhiraj9686
@nidhiraj9686 8 ай бұрын
Bfs,dfs travelsal of graph done ✅✅ nice explanation bhaiya. Boht easily samaj aa gya sab kuch ❤❤
@kamleshregar5880
@kamleshregar5880 5 ай бұрын
bro your lecture on graph is very good .i always fear from 3 topics tree,graph and DP ,but after watching your lectures on tree and now graph i am able to understand tree and graph in a good way and able to solve problems. thank you Bhai for your lectures.
@SARDARAFNANAFZAL
@SARDARAFNANAFZAL 3 күн бұрын
Brother your teaching method is amazing .thank you brother ❤😍.
@pavanyadav3092
@pavanyadav3092 4 ай бұрын
the most underrated teacher on youtube.
@bepositive.29
@bepositive.29 4 ай бұрын
Yes brother
@surajadhikari.
@surajadhikari. 7 ай бұрын
Thank you bhaiya for this incredible content and also mentioning Nepal in DFS. I am from Nepal and following you from couples of month. Thank you from bottom of my heart for amazing content.
@Alokankit627
@Alokankit627 6 ай бұрын
Loving your graphs series, sir please try to add many problems into this playlist 🙏🙏, thanku so much sir for providing such a quality content consistently
@yashwanth4120
@yashwanth4120 3 ай бұрын
bhaiya aap kithna achha padate hoo... So that no confusion is left after the video. thank you so much for the efforts.
@KashafZia-d7p
@KashafZia-d7p Ай бұрын
oh what a mindblowing explanation....Hats off sir
@zafrul_islam
@zafrul_islam 8 ай бұрын
maja aa gya bhaiya (corona and travelling wala concept )👌👌👌
@DeepakKallal-ds1xn
@DeepakKallal-ds1xn Ай бұрын
Thanku sir apne kafi aache se samjhya collage Wale tho hawa main samjha dete hai sab. Meri presentation hai iss topic par tho esi trike se main unko chamka dunga thanku sir ❤👍😊
@vaibhav2831
@vaibhav2831 2 ай бұрын
19:40 coorect me if i am wrong is it bsf somewhat si,ilar to level order treversal from tree
@anupammishra6514
@anupammishra6514 8 ай бұрын
Best explanation bhaiya ❤❤🎉🎉🎉🎉🎉
@anshyoutuber1608
@anshyoutuber1608 4 ай бұрын
Best Part of Real life Example ❤❤❤
@Codewithkumar-gc1kr
@Codewithkumar-gc1kr 2 күн бұрын
best video for BFS and DFS
@heetpatel3037
@heetpatel3037 7 ай бұрын
Jai shree Ram ❤️ Bhaiya ek dum OP lecture AAPSE EK DIN ZARUR MILNA HAI
@Sanataniblood-mb5pu
@Sanataniblood-mb5pu 5 ай бұрын
Your efforts are Unbelievable bhaiya thank for providing such best content to us ❤❤
@Swiftie03
@Swiftie03 6 ай бұрын
Great explanation ❤
@kishan4735
@kishan4735 6 ай бұрын
You lecture given good understanding as well as thinking ability it help to improve me
@vivekpaliwal1876
@vivekpaliwal1876 Ай бұрын
Linklist b to use kr skte hai adjacent list me....bs pointer change kr k remove ho jaega node
@Historyfact-fo8zf
@Historyfact-fo8zf 8 ай бұрын
Sir trie par video kab lekar avoge
@deepanshumohan6182
@deepanshumohan6182 8 ай бұрын
Thanks for the great lecture @coderarmy #RohitNegi. Watching this at midnight. Really great efforts.
@arunnishad7733
@arunnishad7733 5 ай бұрын
Thank you!!!, very good explanation , I have been suffering from understanding the bfs and dfs traversals till date but now it's all clear
@ManojSinghRawat-x2w
@ManojSinghRawat-x2w 8 ай бұрын
chamak chuka hai bhaiya😊
@AdityaSharma-vd7bo
@AdityaSharma-vd7bo Ай бұрын
Bhaiya iss janam mein toh ho gaya was good😂😂😂😂 42:04
@Pixelofficialmohit
@Pixelofficialmohit Ай бұрын
Thank you bhaiya ji ❤
@ankushladani496
@ankushladani496 8 ай бұрын
Bhaiya same algorithm 2 queue ki help se implement kar sakte hai kya?
@monikumarbiswas-c7e
@monikumarbiswas-c7e 8 ай бұрын
thanks a lot vaiya .. waiting for this video . love from Bangladesh ..🥰🥰
@imran3509
@imran3509 8 ай бұрын
maja aaya ,rohit ji kya gate aur dsa prep saath mein ho sakti hai ? currently in 5th sem i want to score good in gate 2025 but placement ka bhi dar lagta hai
@divyanshsharma673
@divyanshsharma673 8 ай бұрын
Amazing content as always 🔥🔥🔥
@pawankr.6273
@pawankr.6273 8 ай бұрын
Day - 03/60 #60DaysOfCode DSA++
@sdtedit5165
@sdtedit5165 8 ай бұрын
bhaiya ham chahte hai ki aap hame C++ DSA se ek bada project bhi banvana jisme sare concept use ho or bahut kuch sikhne ko mile kyuki KZbin par c++ dsa ke achhe project nahi please bhaiya ..
@joydeep-halder
@joydeep-halder 7 ай бұрын
H/W Solution for dfs using stack: vector dfsOfGraph(int V, vector adj[]) { vector ans; vector visited(V, 0); stack st; st.push(0); int node; while(!st.empty()){ node = st.top(); st.pop(); if(!visited[node]){ // Handles the cyclic graph ans.push_back(node); visited[node] = 1; } // Traversing from right to left so that // the leftmost node gets popped out first for(int j=adj[node].size() -1 ; j>=0 ; --j){ if(!visited[adj[node][j]]){ st.push(adj[node][j]); } } } return ans; }
@rejaulislam2593
@rejaulislam2593 3 ай бұрын
chamak gaya sir j alhamdulillah
@ChukuKumar-bj5ni
@ChukuKumar-bj5ni 3 ай бұрын
bhaiya can we traverse singly linked list
@YashNegi-qr6ze
@YashNegi-qr6ze 2 ай бұрын
nice lecture ❤
@utkarshsingh09
@utkarshsingh09 2 ай бұрын
All concepts clear!!
@ThepokeSUST
@ThepokeSUST 8 ай бұрын
what if ,when graph is not connected, then how to do traverse
@souravjyoti64
@souravjyoti64 2 ай бұрын
correct
@gautamkumarverma2929
@gautamkumarverma2929 8 ай бұрын
please Discuss Time complexity as well,Bhaiya 😃
@nanumix3167
@nanumix3167 5 ай бұрын
note: 41:22
@chanchalsoni7535
@chanchalsoni7535 6 ай бұрын
consider urself damn lucky...if u r studying from this person..😌💓
@joshiarmy123
@joshiarmy123 3 ай бұрын
Nice lecture
@bharatmalik2756
@bharatmalik2756 8 ай бұрын
Chamak Gya Bhaiya 🔥🔥
@rashisahu8511
@rashisahu8511 7 ай бұрын
Amazing explanation
@sauravdhar1696
@sauravdhar1696 8 ай бұрын
Bhaiya graphs ke approx kitne lectures honge?
@dawooddawoodahmad6521
@dawooddawoodahmad6521 8 ай бұрын
sir i am waiting for your prims and kruskal algorithm lecture please
@JatinGupta-k8n
@JatinGupta-k8n 8 ай бұрын
Bhaiya please upload shortest path ,dp and greedy series
@swatiyadav3388
@swatiyadav3388 6 ай бұрын
Bhaiya the code for BFS will not work for disconnected graph ........?
@CoderArmy9
@CoderArmy9 6 ай бұрын
Ye code srf connected graph pe work karega, aage ke lecture mein sab cover kiya hai, don’t worry 💙
@sayanacharyya250
@sayanacharyya250 7 ай бұрын
Chamak Gaya bhaiyaa ❤
@karankumar3983
@karankumar3983 8 ай бұрын
Thanks bhaiya Puri feel aa gayi ❤
@ShreeRamSingh-vl9tl
@ShreeRamSingh-vl9tl 8 ай бұрын
54:02 Watching from Nepal♥
@MaheshwariLakde
@MaheshwariLakde 7 ай бұрын
03/60 completed thanks bhaiya..!!
@allinonemoviesyt
@allinonemoviesyt 8 ай бұрын
58:59 Homework : vector dfsOfGraph(int V, vector adj[]) { vector ans; vector visited(V,0); stack st; st.push(0); while(!st.empty()){ int vertex = st.top(); st.pop(); if(!visited[vertex]) ans.push_back(vertex); visited[vertex] = true; for(int i=adj[vertex].size()-1; i>=0; i--){ if(!visited[adj[vertex][i]]){ st.push(adj[vertex][i]); } } } return ans; }
@Rahul-cn8bq
@Rahul-cn8bq 6 ай бұрын
nice explanation
@OnlyPc-c9n
@OnlyPc-c9n 4 ай бұрын
maza aa gaya bhaiya
@shekharsingh2915
@shekharsingh2915 4 ай бұрын
chamak gya bhaiya
@Gyanendra012
@Gyanendra012 8 ай бұрын
Corona op🔥😂 3:42
@bepositive.29
@bepositive.29 4 ай бұрын
Better than code help
@ankushladani496
@ankushladani496 8 ай бұрын
Thanks Bhaiya...🚀💪
@siddharthall-in-one3282
@siddharthall-in-one3282 8 ай бұрын
Are these 60days only on Graph Or any other topic also??
@nidhiraj9686
@nidhiraj9686 8 ай бұрын
Dp also
@Jv_Singh37
@Jv_Singh37 8 ай бұрын
add time stamp plz 😊🎉
@SandeepKumar-uk4kt
@SandeepKumar-uk4kt 8 ай бұрын
Homework: vector dfsOfGraph(int V, vector adj[]) { vector visited(V,0); vector ans; stack st; visited[0]=1; st.push(make_pair(0,0)); ans.push_back(0); while(!st.empty()) { int vertex,index; vertex=st.top().first; index=st.top().second; if(index==adj[vertex].size()) st.pop(); else if(!visited[adj[vertex][index]]) { visited[adj[vertex][index]]=1; st.push(make_pair(adj[vertex][index],0)); ans.push_back(adj[vertex][index]); } else { index++; st.pop(); st.push(make_pair(vertex,index)); } } return ans; }
@seekingsoul871
@seekingsoul871 8 ай бұрын
Bhaiya, I really want your mentorship. Could you help me bhaiya?
@AbhishekKumar-lp7wy
@AbhishekKumar-lp7wy 8 ай бұрын
Good morning bhaiya ❤
@allinonemoviesyt
@allinonemoviesyt 8 ай бұрын
@letsk9188
@letsk9188 8 ай бұрын
pura lecture hi mast tha
@ujjwal02
@ujjwal02 8 ай бұрын
Day 3/60✔
@Ramgangakumar
@Ramgangakumar 2 ай бұрын
sir corona virus ka example nhi lena chahiye tha 😢😢
@Nebula_official_25
@Nebula_official_25 8 ай бұрын
Good morning🌞🌞 bhaiya
@seekingsoul871
@seekingsoul871 8 ай бұрын
Bhaiya Maja aa gaya.
@itshirdeshk
@itshirdeshk 8 ай бұрын
Day 199 ✅🔥
@JASHANPREETSINGH-wx7du
@JASHANPREETSINGH-wx7du 2 ай бұрын
chaa gye sir
@machinecode2.047
@machinecode2.047 8 ай бұрын
Good morning sir 🌅
@uttej1390
@uttej1390 8 ай бұрын
12:00 level sab ke niklenge🤣🤣😅
@Harshmishra0007
@Harshmishra0007 8 ай бұрын
Ram ram bahi❤
@YashSaini007
@YashSaini007 8 ай бұрын
Bhaiya Radhe Radhe 🙏
@shubhamkumarjha9192
@shubhamkumarjha9192 8 ай бұрын
Good morning boss...
@yatindanger
@yatindanger 8 ай бұрын
Day 03/60 completed #60DaysOfCode
@Code_with_Tiwarijii
@Code_with_Tiwarijii 8 ай бұрын
Chamak gya bhaiya
@ishitamaithani1207
@ishitamaithani1207 8 ай бұрын
Bhaiya day 4 ki video😌
@sharadjishukla3297
@sharadjishukla3297 8 ай бұрын
Day 3 Done ✅
@bishalpaul18
@bishalpaul18 7 ай бұрын
Bhai m 2- 3 video dekh chuka hu bfs ka lekin aaj tak samajh nhi aaya ,yaha par bhaiya corona virus ka example deke samjha diye ab kabhi nhi bhulunga😊
@Kirito_kirigaya13_11
@Kirito_kirigaya13_11 8 ай бұрын
Thanku bhaiay❤
@jitDhank04
@jitDhank04 8 ай бұрын
Day 3 🔥🔥
@simisimi9362
@simisimi9362 7 ай бұрын
thank you bhaiya
@kartikay0111
@kartikay0111 7 ай бұрын
kal exam hai aur aaj apke video ne bacha liya
@OK-ku8ez
@OK-ku8ez 6 ай бұрын
Can anyone tell me the error in my code. Please! //We will use two stacks //1st one for storing node(vertex) //2nd one for storing index from where next time unvisited nodes will be checked stacknode; stackindex; //Prevent iteration to begin from start vectorvisited(V,0); vectorans; //Starting from 0th node node.push(0); index.push(0); visited[0]=1; ans.push_back(0); while(!node.empty()) { int j=index.top(); for(; j
@yashparashar6781
@yashparashar6781 8 ай бұрын
Day 03 ✌
@YashSaini007
@YashSaini007 8 ай бұрын
Day - 03/60 #60DaysOfCode
@satyam6943
@satyam6943 6 ай бұрын
Exam se ghatiya chiz kuch nhi jab bhi consistently Karo usi samay exam aake consistency bigad deta hai😡😡
@internetuser_1
@internetuser_1 5 ай бұрын
Same 😢
@Vardanaggarwal
@Vardanaggarwal 6 ай бұрын
concept ++
@monikumarbiswas-c7e
@monikumarbiswas-c7e 7 ай бұрын
vaiya , please write code without class ,. love from bangladesh
@Historyfact-fo8zf
@Historyfact-fo8zf 8 ай бұрын
Sir ase Tu maja nai ayga apke video ka इंतजार karte karte Tu बहुत देर हो जाएगी so please consistency sir
@CoderArmy9
@CoderArmy9 8 ай бұрын
Bro video mon-fri aaygi, btya th video mein
@Historyfact-fo8zf
@Historyfact-fo8zf 8 ай бұрын
@@CoderArmy9 thanks for reply bro you are great ❤❤❤
@SubhashKumar76-x8g
@SubhashKumar76-x8g 8 ай бұрын
03/60 dsa++
@kartikay0111
@kartikay0111 7 ай бұрын
Maja aa gaya
Detect Cycle in an Undirected Graph | BFS + DFS
1:11:45
Coder Army
Рет қаралды 15 М.
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 148 МЛН
Don’t Choose The Wrong Box 😱
00:41
Topper Guild
Рет қаралды 62 МЛН
It works #beatbox #tiktok
00:34
BeatboxJCOP
Рет қаралды 41 МЛН
one year of studying (it was a mistake)
12:51
Jeffrey Codes
Рет қаралды 250 М.
Unsolved Problems in Graph Theory Explained
11:06
ThoughtThrill
Рет қаралды 13 М.
Topological Sort | Kahn's Algorithm
54:59
Coder Army
Рет қаралды 12 М.
Lecture 87: DFS Traversal in Graph || C++ Placement Series
14:18
CodeHelp - by Babbar
Рет қаралды 165 М.
Heap Sort | Build Heap in C++ | Priority Queue
1:19:47
Coder Army
Рет қаралды 23 М.
Bipartite Graph | BFS + DFS + Code + Real Life application
1:13:28