🚨One Important Point - 🚨I should have mentioned above "threshold". There is a condition that "Each node has at most threshold outgoing edges." This condition doesn’t actually matter because, if it’s possible for every node to reach node 0, selecting just one edge per node is sufficient to ensure the graph remains connected.
@NitinrautindoreКүн бұрын
I didn't understand Mike what you are trying to say...please elaborate it.
@gui-codesКүн бұрын
@@Nitinrautindore Threshold wala condition dekho dhyan se. "Each node has at most threshold outgoing edges." Matlab kisi bhi node se zyada se zyada threshold edges jaane chaie. But tum notice karo ki kisi bhi node se tumhe 0 me jana hai to obviosuly ek outgoing edge enough hoga from the node. And constraint me dekho threshold ki value 1
@jain51842 күн бұрын
Mik bhaiya want 2 things we the students are requesting u apka samjaya hua pura thought process dimag me jata hai even kabhi pehla consistent nhi tha apka subha motivation and then video thnku for all this but 1 apki sde sheet 2 dsa pattern recognition ispr video laao 3 for beginners to advance dsa course again ye app pr hai ki app launch karna chahta ho kuki honestly apka jesa ytber mene nhi dekha if u will for course jisme sabkuch included i will be infact bahut log course ke member hoga Again thanku if possible for u then it will be great help as u travel daily firbhi itna quality teaching content thought process salute u men 🫡
@gauravmundhada16472 күн бұрын
Finally contest question! Personally I thought it of Kruskal variation
@sahebraojadhav97272 күн бұрын
Thank u note for mik.really love u mere bhai❤❤❤❤
@souravjoshi22932 күн бұрын
00:42 Goosebumps man. thanks a lot for working so hard for all of us
@Dungeon5502 күн бұрын
I really want to thank MIK sir due to him is that i can enjoy doing DSA problems ,his explaination are just song to ear. Small request from MIK sir if in the future he can share his knowledge and teach important concepts about Development
@joydeepgharami4032 күн бұрын
Thanks sir
@Himanshhhhxu2 күн бұрын
9:58 this was me😁 im still watching your video to get better understanding
@codestorywithMIK2 күн бұрын
❤️😇🙏
@gui-codesКүн бұрын
bhai tumne 3rd Qn contest me solve karliya tha ?
@HimanshhhhxuКүн бұрын
@@gui-codes yes
@adityarawat35334 сағат бұрын
motivation section is really good
@PriyanshuTyagi-ts2uw2 күн бұрын
I figured out the reversing of the edges and mst by myself, got confused in the threshold thing, thanks!
@wearevacationuncoverers2 күн бұрын
🎉 🎉 🎉 Contest qns. yayyyy
@thefinancialdiet44582 күн бұрын
Sir please provide the DSA Sheet as soon as possible, it will be of great help.....and also make a video on how to build intution of the question..... many of us can solve question by seeing ur solution but cant make on our own.... Lots of Loveee sirrrrrr 💝💝💝💝💝💝💝💝💝💝💝💝💝💝💝💝💝💝💝💝💝
@gui-codes2 күн бұрын
yes MIK please
@DevanshGupta-io7rl11 сағат бұрын
jeevan mai maza ab tab ayega jab aisa similar question khud se solve ho jaye live contest ya interview mai
@bhupendrakalal17272 күн бұрын
mik sir abhi abhi just aaj ka constest virtually diya tha usme yahi sam equestion tha nhi bana mere se 😭😭😭😭 , please 4th one also
@Scienceboy12142 күн бұрын
bhaiya, 4th one of today's contest please
@bhupendrakalal17272 күн бұрын
bro 4th bana kya tumse???
@RohitKumar-dz8dh2 күн бұрын
Bhaiya agar time mile to leetcode 3413 problem ka bus approach note post kar dena na, isme sliding window interval k basis pe kese lagau samaj nahi a raha .
@NobitaNarrro2 күн бұрын
Thanks Bhaiya... it was asked in leetcode contest 432
@aws_handles2 күн бұрын
Thanks a lot. I could not solve this during contest.
@KG-ts2cz2 күн бұрын
Hey, I solved it using approach similar to Prim's algo after reversing the graph: class Solution { public: int minMaxWeight(int n, vector& edges, int threshold) { vector adj[n]; for(int i=0;i
@KG-ts2cz2 күн бұрын
Mik, This code got accepted on leetcode, but Prim's is designed for undirected graphs. Can you please tell in which scenario or test case this code might fail?
@gui-codes2 күн бұрын
Thank you so much for contest qn 😭
@unknown478962 күн бұрын
yes bro🥹🥹
@dayashankarlakhotia49432 күн бұрын
First 🎉❤
@unknown__899Күн бұрын
❤️❤️
@AYUSHMEHELDAКүн бұрын
please make videoes for leetcode contest 3rd and 4th problems in every week
@italk-gj5kk2 күн бұрын
please continue with contest solutions...
@prathamagarwal7304Күн бұрын
sir is there no use of the threshold integer which is given?
@codestorywithMIKКүн бұрын
Yes it is not required. Please do check the Pinned comment .
@prathamagarwal7304Күн бұрын
@ Thank you Sir
@somilplayzz96932 күн бұрын
Bhaiya maximum amount of robot can earn wale pr bhi bnado joh aaj ka 2 nd question tha contest ka
@EB-ot8uu2 күн бұрын
MIK, travel karte waqt to araam karlo 😄
@bhupendrakalal17272 күн бұрын
mik bhaiya 1 st approacvh jo mere dimag me aay atha vo minimum spanning tree vala tha ki like udar se banau , kya us se ban skta h ye question????
@gui-codes2 күн бұрын
Nahi bhai. MST works for undirected graphs, where all edges are bidirectional. This problem involves a directed graph, and MST algorithms (like Kruskal's or Prim's) are not designed to handle directionality. Also, the problem explicitly states that all nodes must have a path to node 0. MST focuses on creating a spanning tree with the minimum total weight and doesn’t inherently ensure that all nodes are reachable from a specific node.
@arjunkumaryadav81022 күн бұрын
Bhaiya...Aap please jitne bhi contest hote hai unke hard aur medium questions kare video lekar aaya kariye
@arjunkumaryadav81022 күн бұрын
Bhaiya Hard questions ko kaise approach kare....wo to bante hi nahi
@arjunkumaryadav81022 күн бұрын
Bhaiyya....kyu na main he karu ki kisi bhi ek node start karu aur kosis karu ki 0 node tak pahuch jao aur jab udhar se true return karu to mark karte jao ke ye node visited aur and finally agr visited array me sare node true ho jaye to visited nahi to nahi hai
@codestorywithMIK2 күн бұрын
Definitely you can try that. But when you start from any random node and try to reach 0, it’s not mandatory that you will cover all nodes.
@rode_atharva2 күн бұрын
sir maine c++ me bahut dsa kiya hai. laki mai har baar kuch na kuch syntax bhool jata hu. i know python as well. maine python me dsa karna start kiya hai. mujhe ye comfertable lag raha hai. concept ke liye to me apka hi chaneel follow carta hu bas GPT se code python me convert kr leta hu. please sir bataye kya me sahi kar raha hu python for dsa leke ???. ha lekin c++ karna weste nahi kuki bahut se solution mil jate hai c++ mai
@imPriyansh77Күн бұрын
dsa is language independent...you should be able to come up with a logic
@DevanshGupta-io7rl11 сағат бұрын
bhaiya ye to aagya smajh mai but live contest mai kaise itta strike krega wo bata dijiye kaise improve kru ???
@ParwezAlam-lj7qx2 күн бұрын
but you didn't consider the third condition (threshold outgoing edges) what about this. please explain
@codestorywithMIKКүн бұрын
Please do see the Pinned comment ❤️
@harsh_dhakad_Gamer2 күн бұрын
Sir in this question what js the use of that threshold U donot use that So why ?
@codestorywithMIK2 күн бұрын
Hi Harsh, Please check the Pinned comment above ❤️😇🙏
@harsh_dhakad_Gamer2 күн бұрын
@codestorywithMIK yes thanks sir 🩷
@siikedia2 күн бұрын
what about threshold?
@aws_handles2 күн бұрын
Because anyways we are removing edge. So, there is no chance of increasing the outgoing edges. Every time we remove edge, the outgoing edge is always reduced and hence will never cross the threshold.
@bhupendrakalal17272 күн бұрын
it is getting handled automaticaaly already
@gui-codes2 күн бұрын
see the pinned comment bro
@sujalmahajan9673Күн бұрын
Although solved the problem but I have a doubt in it. Why threshold is not affecting the answer in actual
@codestorywithMIKКүн бұрын
Kindly check the Pinned comment ❤️
@siikedia2 күн бұрын
do 3404. Count Special Subsequences
@sahebraojadhav972713 сағат бұрын
Guys can u tell me why my code giving TLE class Solution { public: void makeDfs(int start,unordered_mapgraph,int maxDist,vector&visited){ visited[start]=true; for(auto &pr:graph[start]){ int dest=pr.first; int dist=pr.second; // cout
@pinakvyas17792 күн бұрын
you didnt checked threshold
@aws_handles2 күн бұрын
Because anyways we are removing edge. So, there is no chance of increasing the outgoing edges. Every time we remove edge, the outgoing edge is always reduced and hence will never cross the threshold.
@gui-codes2 күн бұрын
see the pinned comment bro
@bhupendrakalal17272 күн бұрын
mik bhaiya 1 st approacvh jo mere dimag me aay atha vo minimum spanning tree vala tha ki like udar se banau , kya us se ban skta h ye question????
@gui-codes2 күн бұрын
Nahi bhai. MST works for undirected graphs, where all edges are bidirectional. This problem involves a directed graph, and MST algorithms (like Kruskal's or Prim's) are not designed to handle directionality. Also, the problem explicitly states that all nodes must have a path to node 0. MST focuses on creating a spanning tree with the minimum total weight and doesn’t inherently ensure that all nodes are reachable from a specific node.
@bhupendrakalal17272 күн бұрын
@@gui-codes thank u bro
@bhupendrakalal17272 күн бұрын
@@gui-codes bro can we connect on insta or any other social media??
@KG-ts2cz2 күн бұрын
My code for Prim's got accepted after I reversed the graph and started from 0