Kruskal's Algorithm | Minimum Spanning Tree | Full Dry Run | INTUITION | Graph Concepts & Qns - 36

  Рет қаралды 7,526

codestorywithMIK

codestorywithMIK

Күн бұрын

Пікірлер: 47
@kishan.17
@kishan.17 Жыл бұрын
Congratulations for 6k ,love u bro ❤,and may God bless u for teaching soo many people and helping them , and pls be making videos ❤
@codestorywithMIK
@codestorywithMIK Жыл бұрын
Thank you so much Kishan. Means a lot. Definitely i will keep making videos ❤️❤️❤️❤️
@oqant0424
@oqant0424 11 ай бұрын
U made Kruskal......a HALWA..........i mean seriously ........now I can write the code as well as tell the intuition of Kruskal even in my sleep. All thanks to u
@thekindspill
@thekindspill Жыл бұрын
This playlist is a GOLD. Most underrated graph playlist ever seen
@chiragsingh8323
@chiragsingh8323 Жыл бұрын
Pls dont stop giving bhasan❤ Absolutely love this🔥 Each video i watch there is constant motivation and life lessons to learn. Also pls make concepts videos for other topics too along with interview problems that u r already making..pls make concept videos too it will be helpful for others
@codestorywithMIK
@codestorywithMIK Жыл бұрын
Thank you so much 😀 Sure thing 😇🙏❤️
@sanjaykatta6499
@sanjaykatta6499 11 ай бұрын
DSU, Prims, Kruskals never realised that these algos were this simple until I found your playlist. I owe you a lot sir!
@shubhamjaiswal7645
@shubhamjaiswal7645 5 ай бұрын
according to me...this was the best video till now in this playlist ...literally enjoyed so much ...thank you so much
@gaurimandot5788
@gaurimandot5788 Ай бұрын
Seen your journey from 700 to 70k and excited to see it from 70k to 700k. Thanks bhaiya for making things so simple and fun !!❤
@codestorywithMIK
@codestorywithMIK Ай бұрын
This means a lot Thank you so much 😇🙏
@pankajkashyap2892
@pankajkashyap2892 5 ай бұрын
For sorting there is no need of writing lambda expression as we can put {w,u,v} then call inbuilt sort function that will sort based on first value w. This was just by observation. I always love the way you explain.
@codestorywithMIK
@codestorywithMIK Жыл бұрын
Disjoint Set Union - kzbin.info/www/bejne/d6SklX5-oK6HeLM Disjoint Set Union By Rank and Path Compression - kzbin.info/www/bejne/n3mWiYl_i9-fba8
@wearevacationuncoverers
@wearevacationuncoverers Жыл бұрын
Congratulations for 6k. You deserve it
@souravjoshi2293
@souravjoshi2293 Жыл бұрын
Congratulations for 6k Subscribers bro. You are gonna break all records soon. Thank you so much
@itsanuragjoshi
@itsanuragjoshi 8 ай бұрын
@codestorywithMIK, In Kruskal's algo, we can use min-heap (priority queue) to efficiently select edges with smallest weights without need for sorting a vector array. This approach can improve efficiency of algo, especially for graphs with a large number of edges.
@darkstudio3170
@darkstudio3170 11 ай бұрын
bhai starting ka jo bhasan h usko sunkar mja aa jata h😅
@codestorywithMIK
@codestorywithMIK 11 ай бұрын
😇🙏❤️
@dayashankarlakhotia4943
@dayashankarlakhotia4943 Жыл бұрын
Your channel is growing. Congratulations
@codestorywithMIK
@codestorywithMIK Жыл бұрын
Thank you so much ❤️😇🙏
@gauravbanerjee2898
@gauravbanerjee2898 Жыл бұрын
36/40 done ✅ thanks a lot bhaiya❤✌
@AlishaKhan-ww3io
@AlishaKhan-ww3io Жыл бұрын
Thanku bhaiya ❤ you are best
@umeshbisht1054
@umeshbisht1054 Жыл бұрын
Thanku bhaiya ❤
@kritikasingh4876
@kritikasingh4876 Жыл бұрын
Bhaiya jldi complete krne ka kosis kariye graph and trees bohat accha padhate ho aap
@mohitjain5783
@mohitjain5783 Жыл бұрын
sir I am loving your videos, can you make videos like pattern recognition questions which solve different types of question which cover maximum type of question comgratulations of 6 k ❤
@codestorywithMIK
@codestorywithMIK Жыл бұрын
Thanks a lot 😊❤️ Sure
@crashcartjoe6783
@crashcartjoe6783 Жыл бұрын
bhaiya vector me simply aise push kar denge vec.push_back({w,v,u}); to comparator ka jarurat nhi padega
@harsh.jain22
@harsh.jain22 Жыл бұрын
One doubt, when we are already given the vector
@AlishaKhan-ww3io
@AlishaKhan-ww3io Жыл бұрын
you can sort that as well. However, generally sometimes in interview, they don't allow to modify the original array.
@sanjaykatta6499
@sanjaykatta6499 11 ай бұрын
We can do it by using priority queue also. static int spanningTree(int V, int E, int edges[][]) { // Code Here. PriorityQueue pq = new PriorityQueue(Comparator.comparingInt(a -> a[2])); for (int[] edge : edges) { pq.add(edge); } parent = new int[V]; rank = new int[V]; for (int i = 0; i < V; i++) parent[i] = i; int sum = 0; while (!pq.isEmpty()) { int[] poll = pq.poll(); int u = poll[0]; int v = poll[1]; int w = poll[2]; if (find(u) != find(v)) { union(u, v); sum += w; } } return sum; }
@oqant0424
@oqant0424 11 ай бұрын
36/41 done [11.12.23] ✅✅
@Abhay14
@Abhay14 Жыл бұрын
bhai ye jo compare funtion h sort ke andr uska syntax samjha do
@codestorywithMIK
@codestorywithMIK Жыл бұрын
Sure. Let me soon add a video on that
@kakaji6470
@kakaji6470 4 ай бұрын
Why not we used min_heap concept ??
@manishv.8167
@manishv.8167 Жыл бұрын
How many more videos are left in graph concept playlist??
@codestorywithMIK
@codestorywithMIK Жыл бұрын
Two major ones is left only - 1) Strongly Connected Components (SCC) - Kosaraju’s Algo 2) Articulation Point Once done, will only post interview problems and explanations on Graphs Playlist. Let me know any other topic if left.
@souravjoshi2293
@souravjoshi2293 Жыл бұрын
@@codestorywithMIK Thank you. Please also cover the qn "Alien Dictionary"
@ugcwithaddi
@ugcwithaddi Жыл бұрын
DSU by size
@--Blood--Prince--
@--Blood--Prince-- Жыл бұрын
Sir ye comparator kya hai nhi samjha 18:18
@codeandtalk6
@codeandtalk6 Жыл бұрын
❤❤
@deshmukhsaurav4020
@deshmukhsaurav4020 Жыл бұрын
sir please upload the solution of today's leetcode problem
@codestorywithMIK
@codestorywithMIK Жыл бұрын
Hi there, it was uploaded many months ago. This is the link - kzbin.info/www/bejne/bmLLaYJjZbpopdE
@deshmukhsaurav4020
@deshmukhsaurav4020 Жыл бұрын
@@codestorywithMIK ​ @codestorywithMIK thank you sir...!
@codestorywithMIK
@codestorywithMIK Жыл бұрын
Hope it helps 😇❤️
@dhairyachauhan6622
@dhairyachauhan6622 Жыл бұрын
Sry bro if my comments are spammed 😅.I don't know they disappear after i comment
@codestorywithMIK
@codestorywithMIK Жыл бұрын
Hi Dhairya, sorry to hear that. Can you try again your comment in this thread ? Let’s see if it comes this time. I don’t know why KZbin does that 🥹
@dhairyachauhan6622
@dhairyachauhan6622 Жыл бұрын
@@codestorywithMIK if i add links it deletes the comment 801. Minimum Swaps To Make Sequences Increasing Just wanted to say if you get time please cover this question too 🥲.It really hard to understand
@codestorywithMIK
@codestorywithMIK Жыл бұрын
@dhairyachauhan6622 yes sometimes youtube removes the link not sure why. Sure, noted, will cover this soon
From Small To Giant 0%🍫 VS 100%🍫 #katebrush #shorts #gummy
00:19
The IMPOSSIBLE Puzzle..
00:55
Stokes Twins
Рет қаралды 183 МЛН
Молодой боец приземлил легенду!
01:02
МИНУС БАЛЛ
Рет қаралды 2,1 МЛН
Увеличили моцареллу для @Lorenzo.bagnati
00:48
Кушать Хочу
Рет қаралды 8 МЛН
3.5 Prims and Kruskals Algorithms - Greedy Method
20:12
Abdul Bari
Рет қаралды 2,9 МЛН
G-45. Prim's Algorithm - Minimum Spanning Tree - C++ and Java
19:10
take U forward
Рет қаралды 271 М.
NVIDIA’s New AI: Stunning Voice Generator!
6:21
Two Minute Papers
Рет қаралды 76 М.
Why is Python 150X slower than C?
10:45
Mehul - Codedamn
Рет қаралды 17 М.
From Small To Giant 0%🍫 VS 100%🍫 #katebrush #shorts #gummy
00:19