Пікірлер
@Superak07
@Superak07 2 сағат бұрын
that "Papa ji banega" was hilarious 😂😂! btw very informative video ❤❤
@harshikasani6436
@harshikasani6436 2 сағат бұрын
The way you explain CONCEPTS is very nice !!
@priyajaiwal8072
@priyajaiwal8072 3 сағат бұрын
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. :!
@codestorywithMIK
@codestorywithMIK 3 сағат бұрын
Sure thing . Will be bringing more 😇🙏
@rockykumarverma980
@rockykumarverma980 4 сағат бұрын
Thank you so much Bhaiya ji 🙏🙏🙏
@Vaibhav-Saxena25
@Vaibhav-Saxena25 6 сағат бұрын
Graph playlist 💪💪💪💪
@sauravchandra10
@sauravchandra10 8 сағат бұрын
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.
@dayashankarlakhotia4943
@dayashankarlakhotia4943 8 сағат бұрын
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;🎉❤
@priyajaiwal8072
@priyajaiwal8072 9 сағат бұрын
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
@priyajaiwal8072
@priyajaiwal8072 9 сағат бұрын
Hi MIK, Can you share which yesterday's problem you are mentioning here?
@itsaayush7357
@itsaayush7357 9 сағат бұрын
😂😂
@shradhasuman1192
@shradhasuman1192 11 сағат бұрын
Bhaeya there is a dp approach also for this problem can you expain that.
@InfinityVerse__s
@InfinityVerse__s 11 сағат бұрын
😂
@wasim5655
@wasim5655 11 сағат бұрын
Assalam malkum mia bhai
@codestorywithMIK
@codestorywithMIK 10 сағат бұрын
Walaikum Assalam ❤️
@dayashankarlakhotia4943
@dayashankarlakhotia4943 11 сағат бұрын
🎉❤
@priyajaiwal8072
@priyajaiwal8072 11 сағат бұрын
Great explanation, MIK. One thing is, I don't understand why pq is not used. We are almost doing Djikstra here?
@ashokchourasia
@ashokchourasia 12 сағат бұрын
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_Buzz07
@Coder_Buzz07 12 сағат бұрын
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!
@codestorywithMIK
@codestorywithMIK 11 сағат бұрын
Many Many Congratulations 🎊🎊🎉🎉❤️❤️ So happy to hear that. Grabbing multiple offers feels great 😍❤️🔥
@Coder_Buzz07
@Coder_Buzz07 11 сағат бұрын
@codestorywithMIK yes bhaiya it's all happened bcoz of u🫡🫡
@a2_19_sagarkumarpandit4
@a2_19_sagarkumarpandit4 8 сағат бұрын
When tcs publish thier results? In which college you are?
@Coder_Buzz07
@Coder_Buzz07 8 сағат бұрын
@@a2_19_sagarkumarpandit4 for our college it's published today itself and I'm from srm ktr campus
@gui-codes
@gui-codes 7 сағат бұрын
Congratulations man.
@ShubhamShekhar-cm6rs
@ShubhamShekhar-cm6rs 12 сағат бұрын
I used the BFS technique and solved it. Your Graph concept playlist is helpful.
@KankanaNandi-n6d
@KankanaNandi-n6d 12 сағат бұрын
bhaiya trees ka playlist haiii?
@codestorywithMIK
@codestorywithMIK 12 сағат бұрын
kzbin.info/aero/PLpIkg8OmuX-K23LhcamOcDlTBisiNJy5E&si=8OYqzFMgO9MOXp_F Hope this helps ❤️🙏😇
@amanpatel8575
@amanpatel8575 13 сағат бұрын
Knew about your channel last week. Became a huge fan of yours! Especially your motivation at start encourages me to keep trying. Thanks Man! ❤
@codestorywithMIK
@codestorywithMIK 12 сағат бұрын
Means a lot ❤️🙏
@KeshavKumar-jl1ub
@KeshavKumar-jl1ub 13 сағат бұрын
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
@navdeepdhama403
@navdeepdhama403 13 сағат бұрын
😂
@gauravmundhada1647
@gauravmundhada1647 14 сағат бұрын
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; } };
@vinaymaurya4895
@vinaymaurya4895 14 сағат бұрын
😂😂😂
@abhiroopmokshagnabheemineni
@abhiroopmokshagnabheemineni 14 сағат бұрын
😂😂😂
@thetoxicguy4783
@thetoxicguy4783 15 сағат бұрын
😂😂
@aizad786iqbal
@aizad786iqbal 15 сағат бұрын
how to know when to make adj list and when not to, e.g. yesterday there wasn't any need of adj list...
@gauravmundhada1647
@gauravmundhada1647 13 сағат бұрын
@@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.
@bishwashkumarsah171
@bishwashkumarsah171 11 сағат бұрын
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-codes
@gui-codes 7 сағат бұрын
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.
@KhushnorRahmanMeem
@KhushnorRahmanMeem 15 сағат бұрын
Your motivation makes my day
@adritaadi8027
@adritaadi8027 15 сағат бұрын
did it by myself today! thanks to you and your graph series!
@jeehub041
@jeehub041 15 сағат бұрын
Already did this using BFS, Thank you bhaiya ❤
@bhuppidhamii
@bhuppidhamii 16 сағат бұрын
Graph Concept playlist is for beginners? With 0 knowledge of graphs?
@codestorywithMIK
@codestorywithMIK 15 сағат бұрын
Yes ❤️
@lakshyathedestiny7674
@lakshyathedestiny7674 16 сағат бұрын
Kya bhai dil pr war krte ho😂😂❤
@manu-singh
@manu-singh 16 сағат бұрын
😅😂🥲
@hare_krishna8411
@hare_krishna8411 17 сағат бұрын
bhaiya raadhe raadhe❤
@codestorywithMIK
@codestorywithMIK 16 сағат бұрын
Radhe Radhe ❤️😇🙏
@ramlakhangupta856
@ramlakhangupta856 17 сағат бұрын
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)
@codestorywithMIK
@codestorywithMIK 17 сағат бұрын
Thank you 😇❤️ Means a lot. I use the default “Notes” app in ipad11 pro
@Danish-saifi1
@Danish-saifi1 17 сағат бұрын
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.
@codestorywithMIK
@codestorywithMIK 17 сағат бұрын
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 🙏❤️😇👌
@psychologyfact2320
@psychologyfact2320 12 сағат бұрын
Congratulations🥳👏👏🎉
@gui-codes
@gui-codes 7 сағат бұрын
Congratulations man.
@rockykumarverma980
@rockykumarverma980 4 сағат бұрын
Congratulations🥰🥰🥰
@codestorywithMIK
@codestorywithMIK 17 сағат бұрын
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 ❤
@thekindspill
@thekindspill 20 сағат бұрын
Your Graph concepts playlist is a game changer 👌🏻
@ashraysuman1157
@ashraysuman1157 23 сағат бұрын
your explanation is really wellll
@YashSinghal
@YashSinghal Күн бұрын
I coded myself but my solution ended up just like yours. The same vector and variable names. The same if statement 😂
@bhushanambhore8378
@bhushanambhore8378 Күн бұрын
Thanks man! I am definitely checking out your Graph Playlist.
@jagpreetsingh7652
@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.
@codestorywithMIK
@codestorywithMIK 17 сағат бұрын
Let’s do this ❤️🔥🔥
@jagpreetsingh7652
@jagpreetsingh7652 14 сағат бұрын
@@codestorywithMIK for sure 👍
@jayanaaryan3498
@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
@GungunSaluja-sy6br Күн бұрын
nice explanation loved it!❤❤
@DRAGON-in8px
@DRAGON-in8px Күн бұрын
Do i need to complete graph topic before or I can directly watch your playlist
@adityaparab4314
@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
@codestorywithMIK Күн бұрын
❤️🙏
@SalmanAnsari-ex1li
@SalmanAnsari-ex1li Күн бұрын
🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥 Today's Quote won my heart
@illustratedguy9951
@illustratedguy9951 Күн бұрын
keep it up bhai
@illustratedguy9951
@illustratedguy9951 Күн бұрын
awesome explaination till now on youtube
@v4ktech228
@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!"
@codestorywithMIK
@codestorywithMIK Күн бұрын
❤️❤️😇😇🙏🙏