that "Papa ji banega" was hilarious 😂😂! btw very informative video ❤❤
@harshikasani64362 сағат бұрын
The way you explain CONCEPTS is very nice !!
@priyajaiwal80723 сағат бұрын
The structure with which you create every video is commendable. System design resources are all over the places on the internet, however, with old and rushed explanations especially LLD. This is a humble request if you can try putting in more system design-related content whenever you get some time, please. :!
@codestorywithMIK3 сағат бұрын
Sure thing . Will be bringing more 😇🙏
@rockykumarverma9804 сағат бұрын
Thank you so much Bhaiya ji 🙏🙏🙏
@Vaibhav-Saxena256 сағат бұрын
Graph playlist 💪💪💪💪
@sauravchandra108 сағат бұрын
I spent a lot of time figuring out how to solve this without calling BFS every time. I guess this was the most optimal approach.
@dayashankarlakhotia49438 сағат бұрын
public int[]shortestDistanceAfterQueries(int n,int[][]queries){ int[]next=new int[n]; Arrays.setAll(next,i->i+1); int m=queries.length,dist=n-1; for(int i=0;i<m;i++){ int s=queries[i][0],e=queries[i][1]; while(next[s]<e){ int t=next[s]; next[s]=e; s=t; dist--; } ans[i]=dist; } return ans; } Tc=n+q;🎉❤
@priyajaiwal80729 сағат бұрын
You can use l<=r as we do in normal BS; that way you can do high=mid-1 because eating mid bananas/hour will also be considered then. alternatively you can do l<r but while adjusting high, use high=mid so we are considering at 'mid' also
@priyajaiwal80729 сағат бұрын
Hi MIK, Can you share which yesterday's problem you are mentioning here?
@itsaayush73579 сағат бұрын
😂😂
@shradhasuman119211 сағат бұрын
Bhaeya there is a dp approach also for this problem can you expain that.
@InfinityVerse__s11 сағат бұрын
😂
@wasim565511 сағат бұрын
Assalam malkum mia bhai
@codestorywithMIK10 сағат бұрын
Walaikum Assalam ❤️
@dayashankarlakhotia494311 сағат бұрын
🎉❤
@priyajaiwal807211 сағат бұрын
Great explanation, MIK. One thing is, I don't understand why pq is not used. We are almost doing Djikstra here?
@ashokchourasia12 сағат бұрын
with every edge addition the path is getting shorter. it can never increase. if we have received the shortest path value of 1 in any loop, do we need to run the loop again? because after this, every returned value will be 1. we can break out of the loop. (we must assign an initial value of 1 in every res[i]). Please correct me if i am wrong.
@Coder_Buzz0712 сағат бұрын
Hello Bhaiya, I’ve received another offer of 9 LPA from TCS Prime! Thank you so much for your video explanations they’ve been incredibly helpful throughout my journey. Truly grateful for your guidance!
@codestorywithMIK11 сағат бұрын
Many Many Congratulations 🎊🎊🎉🎉❤️❤️ So happy to hear that. Grabbing multiple offers feels great 😍❤️🔥
@Coder_Buzz0711 сағат бұрын
@codestorywithMIK yes bhaiya it's all happened bcoz of u🫡🫡
@a2_19_sagarkumarpandit48 сағат бұрын
When tcs publish thier results? In which college you are?
@Coder_Buzz078 сағат бұрын
@@a2_19_sagarkumarpandit4 for our college it's published today itself and I'm from srm ktr campus
@gui-codes7 сағат бұрын
Congratulations man.
@ShubhamShekhar-cm6rs12 сағат бұрын
I used the BFS technique and solved it. Your Graph concept playlist is helpful.
@KankanaNandi-n6d12 сағат бұрын
bhaiya trees ka playlist haiii?
@codestorywithMIK12 сағат бұрын
kzbin.info/aero/PLpIkg8OmuX-K23LhcamOcDlTBisiNJy5E&si=8OYqzFMgO9MOXp_F Hope this helps ❤️🙏😇
@amanpatel857513 сағат бұрын
Knew about your channel last week. Became a huge fan of yours! Especially your motivation at start encourages me to keep trying. Thanks Man! ❤
@codestorywithMIK12 сағат бұрын
Means a lot ❤️🙏
@KeshavKumar-jl1ub13 сағат бұрын
sir lps pe appki ik video hai please make video on longest proper prefix and suffix .... which means that we common part ka no count kare.... aaa is me ans hoga 1 not 2....lps me iska ans 2 hota hai kyu ki wo middle wala a bhi count karta hai lekin proper me sirf left wala a count in prefix and suffix me sirf right wala .. please solution
@navdeepdhama40313 сағат бұрын
😂
@gauravmundhada164714 сағат бұрын
Solved on own. All credit to MIK's Graph Playlist. Turning Story into code. MY CODE-> class Solution { public: vector<int> shortestDistanceAfterQueries(int n, vector<vector<int>>& queries) { unordered_map<int, vector<int>> graph; vector<int> result; //Step1 := Form a initial graph (0->1->2->......n-1) for (int i = 0; i <= n - 2; ++i) { graph[i].push_back(i + 1); } //Step 2 := Execute one query at a time and find distance for (vector<int>& query : queries) { int u = query[0], v = query[1]; graph[u].push_back(v); // unidirectional int ans = bfs(0, n - 1, graph); result.push_back(ans); } return result; } int bfs(int src, int dest, unordered_map<int, vector<int>>& graph) { queue<pair<int, int>> que; // Pair of (node, distance from src) unordered_set<int> visited; que.push({src, 0}); visited.insert(src); while (!que.empty()) { int u = que.front().first; int dist = que.front().second; que.pop(); if (u == dest) { return dist; } for (int v : graph[u]) { if (visited.find(v) == visited.end()) { visited.insert(v); que.push({v, dist + 1}); } } } return -1; } };
@vinaymaurya489514 сағат бұрын
😂😂😂
@abhiroopmokshagnabheemineni14 сағат бұрын
😂😂😂
@thetoxicguy478315 сағат бұрын
😂😂
@aizad786iqbal15 сағат бұрын
how to know when to make adj list and when not to, e.g. yesterday there wasn't any need of adj list...
@gauravmundhada164713 сағат бұрын
@@aizad786iqbal brother in today’s question the adj list is getting updated with each query also no list is provided as parameter so we need to create it.
@bishwashkumarsah17111 сағат бұрын
i guess we had to make adj list for yesterday problem. since for each 0 we can go 4 direction but since we changed it to string we made dic = { 0:{1,3}, 1:{0,2,4}, 2:{1,5}, 3:{0,4}, 4:{1,3,5}, 5:{2,4} } for every possible position of 0.
@gui-codes7 сағат бұрын
If you don't create adj list, then you won't be able to know who are the neighbors of a node in the graph.
@KhushnorRahmanMeem15 сағат бұрын
Your motivation makes my day
@adritaadi802715 сағат бұрын
did it by myself today! thanks to you and your graph series!
@jeehub04115 сағат бұрын
Already did this using BFS, Thank you bhaiya ❤
@bhuppidhamii16 сағат бұрын
Graph Concept playlist is for beginners? With 0 knowledge of graphs?
@codestorywithMIK15 сағат бұрын
Yes ❤️
@lakshyathedestiny767416 сағат бұрын
Kya bhai dil pr war krte ho😂😂❤
@manu-singh16 сағат бұрын
😅😂🥲
@hare_krishna841117 сағат бұрын
bhaiya raadhe raadhe❤
@codestorywithMIK16 сағат бұрын
Radhe Radhe ❤️😇🙏
@ramlakhangupta85617 сағат бұрын
bhaiya aap bahut hi acche se samzate ho i am so blessing full. bhaiya ek request or h ki aap ye app ka naam bta do jisse ap ye padhate ho tablet me (konsa notes ka app kafi acche feature h)
@codestorywithMIK17 сағат бұрын
Thank you 😇❤️ Means a lot. I use the default “Notes” app in ipad11 pro
@Danish-saifi117 сағат бұрын
Finally, I got placed 🥺😇! I've been following you since you had 10k subscribers. Thank you for explaining the real intuition behind the problems. I never thought I would get placed this year. I used to read comments on your channel from other students sharing their placement stories, and I often doubted myself. But I didn’t give up and got placed in a decent company with a 10 LPA package. I know it’s not much, but I’ll work even harder from now on.
@codestorywithMIK17 сағат бұрын
Many Many Congratulations ✨🎊🎊🎉🎉 Very happy to see this early morning. What a day to start ❤️ And thank you for staying with me since 10K This means a lot. Congratulations and keep up the hard work 🙏❤️😇👌
@psychologyfact232012 сағат бұрын
Congratulations🥳👏👏🎉
@gui-codes7 сағат бұрын
Congratulations man.
@rockykumarverma9804 сағат бұрын
Congratulations🥰🥰🥰
@codestorywithMIK17 сағат бұрын
Choosing Between the Two: Use Dijkstra’s Algorithm when dealing with weighted graphs where edge distances vary. Use BFS when the graph is unweighted or all edges have equal weight, as it is simpler and faster in these cases. Thanks & Regards, Tumhara MIK ❤
@thekindspill20 сағат бұрын
Your Graph concepts playlist is a game changer 👌🏻
@ashraysuman115723 сағат бұрын
your explanation is really wellll
@YashSinghalКүн бұрын
I coded myself but my solution ended up just like yours. The same vector and variable names. The same if statement 😂
@bhushanambhore8378Күн бұрын
Thanks man! I am definitely checking out your Graph Playlist.
@jagpreetsingh7652Күн бұрын
Sir i left Daily problems from around 4 months and i was self doubting and i don't know what happened aaj wapis se krne ka man kra then i opened your video and the motivation i needed was the one which you gave in the video , Now will not stop till i get placed.
@codestorywithMIK17 сағат бұрын
Let’s do this ❤️🔥🔥
@jagpreetsingh765214 сағат бұрын
@@codestorywithMIK for sure 👍
@jayanaaryan3498Күн бұрын
bhai eak batao mai love babber ki c++ wale playist kaar rha hu aur mai graphs start karne wala hu to wha se padhu ya apki playist se??
@GungunSaluja-sy6brКүн бұрын
nice explanation loved it!❤❤
@DRAGON-in8pxКүн бұрын
Do i need to complete graph topic before or I can directly watch your playlist
@adityaparab4314Күн бұрын
Graph playlist is the best graph playlist on youtube, helped me the most and I recommend it to everyone. Keep up the great work Mazhar sir.
@codestorywithMIKКүн бұрын
❤️🙏
@SalmanAnsari-ex1liКүн бұрын
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥 Today's Quote won my heart
@illustratedguy9951Күн бұрын
keep it up bhai
@illustratedguy9951Күн бұрын
awesome explaination till now on youtube
@v4ktech228Күн бұрын
"Thanks for this detailed explanation! The step-by-step approach and code breakdown made the concept so much easier to understand. Great job on simplifying complex topics! Looking forward to more such videos!"