Feels so honoured that He is my college alumni, absolute goated stuff Bhaiya🦾
@codestorywithMIK6 сағат бұрын
This means a lot ❤️🙏
@NikhilYadav-i2f5 сағат бұрын
@@codestorywithMIK Can we connect by any means, Bhaiya? Need some advice regarding tech stuffs and hiring, this year has been drastic for us with regards to internship and placement.
@codestorywithMIK13 сағат бұрын
NOTE - The diameter of a tree or graph represents the longest path between any two nodes, and this path does NOT contain any REPEATED edges or nodes. Today's POTD Link - kzbin.info/www/bejne/q6vCiHyJpd6GfNU
@ShivamSharma-vf4uf5 сағат бұрын
SIR PLEASE SOLVE 21 DEC AND 22 DEC Problem of the day as you skipped these problems on that day
@sumitgupta31011 сағат бұрын
Leetcode : 3203 (using video Explaination) sol : class Solution { public: pair bfsTofindFarthestNode(int s, int v, unordered_map& adj) { vector vis(v, false); queue q; q.push(s); vis[s] = true; // Mark starting node as visited int level = 0, farthestNode = s; while (!q.empty()) { int n = q.size(); for (int i = 0; i < n; i++) { int node = q.front(); q.pop(); farthestNode = node; for (auto it : adj[node]) { if (!vis[it]) { vis[it] = true; // Mark neighbor as visited before enqueueing q.push(it); } } } if (!q.empty()) level++; } return {farthestNode, level}; } int treeDiameter(vector& edges) { int v = edges.size() + 1; // Number of nodes unordered_map adj; for (const auto& edge : edges) { int u = edge[0], v = edge[1]; adj[u].push_back(v); adj[v].push_back(u); } auto oneEndNode = bfsTofindFarthestNode(0, v, adj); auto otherEndNode = bfsTofindFarthestNode(oneEndNode.first, v, adj); return otherEndNode.second; // Diameter of the tree } int minimumDiameterAfterMerge(vector& edges1, vector& edges2) { int dia1 = treeDiameter(edges1); int dia2 = treeDiameter(edges2); int combinedDia = ceil(dia1 / 2.0) + ceil(dia2 / 2.0) + 1; return max({dia1, dia2, combinedDia}); } };
@gui-codes12 сағат бұрын
Done and crystal clear. These concepts I was not even taught in a paid course I took years ago. I wish I had found you earlier. Waiting for today's POTD now.
@aws_handles11 сағат бұрын
Man you are a legend and so hard working. Thank you for clearing the concepts. Now I can understand the POTD
@Abraham332866 сағат бұрын
Your explanation is unbeatable.
@SiddheshPardeshi-mp9cr7 сағат бұрын
Amazing explanation, Keep the good work
@abhinay.k8 сағат бұрын
20:14
@I_Love_You_Mansi_Forever5 сағат бұрын
mik sir you are so underrated!!
@k-CE-OmkarPathak12 сағат бұрын
Great concepts
@Coder_Buzz0714 сағат бұрын
First view😍❤
@gui-codes14 сағат бұрын
Wow. Thanks a lot MIK. Was waiting for this one.
@metirajendar63969 сағат бұрын
What if the node 5 has two child nodes(say 10 and 11) in the dry run? Do we get multiple options for diameters? How does this effect the diameter paths(having multiple paths with diameter k)?
@varunaggarwal712610 сағат бұрын
I made silly mistakes during oa rounds due to stress, later I was able to solve 😭😭
@abhinay.k8 сағат бұрын
Thanks sir
@vaibhavyadav330112 сағат бұрын
Bro your whole content is aroud dsa and leetcode, you should take the premium again 😅
@anshuman555411 сағат бұрын
Sir, expedia group USA ke liye refer kr skte ho kya? i am doing my masters here
@amardeep77144 сағат бұрын
MIK , plz 1 vdeo on Bridge of graph....i knw ki dfs s hoga ..time stamp discovery and finish time ka concept h but still achhe s clear nai hua h...so plz try to bring that too.. Also i am placed in campus in PSU with 21 ctc. Thankyou so much for everything .
@ShivamSharma-vf4uf10 сағат бұрын
SIR PLEASE SOLVE 21 DEC AND 22 DEC Problem of the day as you skipped these problems on that day @codestorywithMIK
@RishabhChatterjee-fg2gz6 сағат бұрын
Bhaiya mathematical proof wala ek baar firse samjha do, Aur Bhaiya d(u,a) > d(u,b) ho sakta hai aap jo diagram liye uske basis pe aagar mein u ko b se 1 distance pe rakhu, ye wala thik se samajh nhi aaya, mathematical wala ek baar aur Bhaiya please
@ashutoshchouhan9610Сағат бұрын
14:24 🔔 vo yaha kisa lye karaga 😂😂🤣
@aadityaraj23976 сағат бұрын
ye question CSES sheet me bhi hai
@yogendrakesharwani36503 сағат бұрын
I am not able to search for leetcode POTD section. Where is that section ?
Its daily challenge problems, You can find in the right side of the problem section.(Looks like calendar)
@varunpalsingh382211 сағат бұрын
MIK ek roadmap bana sakte ho ? How to get good tech job in 2025 I sometimes got distract from my path ki what how and where to do
@HeetVichhivora12 сағат бұрын
Mik bhaiya perso ka video please
@anshkapooriitb645813 сағат бұрын
2940. Find Building Where Alice and Bob Can Meet solution video please
@codestorywithMIK13 сағат бұрын
coming today.
@sarangkale676114 сағат бұрын
Sir Aaj POTD nhi solve karenge?
@codestorywithMIK14 сағат бұрын
Definitely it will come. But before solving today's POTD, this video is going to be very important. Do watch this one because we will directly use the code of this video to today's POTD.