One of the finest explanations... and finally I earned the MAY batch, thanks to you sir💖💖
@codestorywithMIK Жыл бұрын
So happy to hear that. Feel free to share that everywhere to spread the motivation Thanks again
@mohithadiyal6083 Жыл бұрын
simply amazing
@codestorywithMIK Жыл бұрын
Thanks a lot Mohit ❤️
@souravjoshi2293 Жыл бұрын
Never fail to mesmerise me. You have a unique way of teaching bro. People will talk about you in future.
@tutuimam3381 Жыл бұрын
Amazing explanation
@AlishaKhan-ww3io Жыл бұрын
Finest tutor on KZbin
@UECAshutoshKumar4 ай бұрын
Thank You!
@sidharthdhiman4522 Жыл бұрын
best method to solve the queison is through story sir , amazing , i did figureed out of checkin map and type also but wans't able to get the checkout mp and what would be the key and value but when you approach the problem through reverse method finding first checkoutmap and through that you ind what should be the checkin is amazing approach
@codestorywithMIK Жыл бұрын
Thank you Sidharth ❤️❤️
@floatingpoint7629 Жыл бұрын
thanks for this. it was helpful i was able to it myself after seeing the story points
@anuppatankar4294 Жыл бұрын
Great video 👍🏻
@codestorywithMIK Жыл бұрын
Thanks a lot Anup ❤️❤️
@wearevacationuncoverers Жыл бұрын
This is the one stop solution to all my problems. ❣
@mewaconite Жыл бұрын
thank you for creating this video, always love your explanation ❤
@codestorywithMIK Жыл бұрын
Thanks a lot ❤️❤️
@shikharpandya49274 ай бұрын
thank u sir
@codeandtalk6 Жыл бұрын
❤
@codestorywithMIK Жыл бұрын
❤️❤️
@boomburstshorts2347 Жыл бұрын
Finally the video came 😁
@codestorywithMIK Жыл бұрын
Sorry for delay today . Little hectic day. Thank you for trusting my channel ❤️
@tauquirahmed1879 Жыл бұрын
Yeah mera pehla view ❣️
@codestorywithMIK Жыл бұрын
Thanks a lot ❤️❤️
@thephalcon Жыл бұрын
Sir javascript se bhi implement kriye please
@codestorywithMIK Жыл бұрын
Hello there, Unfortunately I am not well versed with Javascript Data structs but I can help provide the code from other source. Please find it below . I hope that helps : var UndergroundSystem = function () { this.checkInData = new Map(); this.journeyData = new Map(); }; /** * @param {number} ID * @param {string} checkInStation * @param {number} checkInTime * @return {void} */ UndergroundSystem.prototype.checkIn = function (ID, checkInStation, checkInTime) { this.checkInData.set(ID, new CheckIn(checkInStation, checkInTime)); }; /** * @param {number} ID * @param {string} checkOutStation * @param {number} checkOutTime * @return {void} */ UndergroundSystem.prototype.checkOut = function (ID, checkOutStation, checkOutTime) { let checkIn = this.checkInData.get(ID); this.checkInData.delete(ID); let journey = checkIn.checkInStation + "->" + checkOutStation; if (!this.journeyData.has(journey)) { this.journeyData.set(journey, [0, 0]); } this.journeyData.get(journey)[0] += checkOutTime - checkIn.checkInTime; this.journeyData.get(journey)[1]++; }; /** * @param {string} startStation * @param {string} endStation * @return {number} */ UndergroundSystem.prototype.getAverageTime = function (startStation, endStation) { let journey = startStation + "->" + endStation; return this.journeyData.get(journey)[0] / this.journeyData.get(journey)[1]; }; function CheckIn(checkInStation, checkInTime) { this.checkInStation = checkInStation; this.checkInTime = checkInTime; }
@honey6567 Жыл бұрын
bhaiya please code force bhi start kr do
@codestorywithMIK Жыл бұрын
I will plan that soon. Just planning to first complete important playlist of Graph, DP etc Then i will start uploading GFG POTD, Contests, codeforces etc
@kuchtha9982 Жыл бұрын
Mera second comment😊
@codestorywithMIK Жыл бұрын
Thanks a lot ❤️❤️
@honey6567 Жыл бұрын
their are more child come on youtube to teach algo those Algo that are already cover in most youtuber
@honey6567 Жыл бұрын
every think and every code teaches fail on front of you like , labb labb labb;.. every youtuber are smill knowladege on data structer
@codestorywithMIK Жыл бұрын
Means a lot Honey ❤️❤️❤️
@honey6567 Жыл бұрын
@@codestorywithMIK bhaiya please please codeforce bhi start kr do na ..
@yuvhrajverma9665 Жыл бұрын
Sir can u plz tell me what's wrong with this code , only passes 48 testcases class UndergroundSystem { class pair{ int id,t; pair(int id,int t){ this.id=id; this.t=t; } } HashMapcheckin; HashMapcheckout; public UndergroundSystem() { checkin=new HashMap(); checkout=new HashMap(); } public void checkIn(int id, String stationName, int t) { ArrayListl=checkin.getOrDefault(stationName,new ArrayList()); l.add(new pair(id,t)); checkin.put(stationName,l); } public void checkOut(int id, String stationName, int t) { ArrayListl=checkout.getOrDefault(stationName,new ArrayList()); l.add(new pair(id,t)); checkout.put(stationName,l); } public double getAverageTime(String startStation, String endStation) { ArrayListl=checkin.get(startStation); ArrayListl1=checkout.get(endStation); int c=0; double s=0; for(pair p:l){ for(pair p1:l1){ if(p.id==p1.id){ s+=(p1.t-p.t); c++; } } } s/=c; return s; } }