My Calendar II | Simplest Explanation | Full Dry Run | Leetcode 731 | codestorywithMIK

  Рет қаралды 6,456

codestorywithMIK

codestorywithMIK

Күн бұрын

Пікірлер: 88
@kirtisharma7073
@kirtisharma7073 Ай бұрын
Thank you bhaiya, I have received a full time offer from flipkart. Your videos have helped me a lot and I hope your channel grows even more….You deserve so much more love and support❤️
@codestorywithMIK
@codestorywithMIK Ай бұрын
Wow. Many Many Congratulations 🎉🎉🎊🎊 So happy to see this.😇 Congratulations 🙌
@souravjoshi2293
@souravjoshi2293 Ай бұрын
congrats
@rockykumarverma980
@rockykumarverma980 Ай бұрын
congratulation 🎉 🎉 🥰🥰
@thekindspill
@thekindspill Ай бұрын
Congratulations
@kushjoshi9427
@kushjoshi9427 Ай бұрын
Congratulations bro
@wearevacationuncoverers
@wearevacationuncoverers Ай бұрын
0:27 Are sir , please don't be sorry. We know you are the best.
@shiveshanand5812
@shiveshanand5812 Ай бұрын
Great Explanation. I was completely fine with the previous lengthy explanation, I loved that you are explaining even a simpler problem with so much details!
@rohanmandal369
@rohanmandal369 Ай бұрын
We felt the same that it was over descriptive, but seeing you realized that , shows how good of a teacher you are 🙇🏻🙇🏻❤❤
@codestorywithMIK
@codestorywithMIK Ай бұрын
This means a lot to me ❤️🙏
@rajchinagundi7498
@rajchinagundi7498 Ай бұрын
@@codestorywithMIK Sir dont take it to your heart. You are like a big brother to us, my problem solving skills have improved a long way with your video explanations, letting you know that we still love your videos a lot.
@itsharshita22
@itsharshita22 Ай бұрын
Yes bhaiya kal wale explanation ke comparison mein aj wala jada simple tha 😄
@prajitbanerjee8226
@prajitbanerjee8226 Ай бұрын
nahi aapne sahi explain kiya tha calender-I.Your explanation was perfect because most of use dont do lower_bound on set.So your explanation was execellent.
@codestorywithMIK
@codestorywithMIK Ай бұрын
❤️🙏
@study-yd6es
@study-yd6es Ай бұрын
Thank you, bhaiya! No need to apologize-you’re doing great. Some of us might already have a good grasp of DSA and feel the explanations are a bit detailed, but I think it’s good to keep them general so beginners can understand too. For those who already know the concepts, they can just follow one example and start solving right away. That’s what I usually do-I pause after the example, solve it, and then continue with the video.
@SrishtiKapoor-d1w
@SrishtiKapoor-d1w Ай бұрын
Understood the problem really well. Was able to code myself after understanding the approach!! Thank you so much 🙂
@dreamexcellence
@dreamexcellence Ай бұрын
Hello sir, I watch your videos to see if there is any optimization possible in my code. Your yesterday's code helped me understand that we can use sets as well. We can use that for today's question too, right? That's why I think your yesterday's video was not overly descriptive; it was good.
@ratneshsingh8403
@ratneshsingh8403 Ай бұрын
I think mai apke channel se tbse juda hoon jab apke 1K subscriber the aur jbse jud gya tbse baki sare channels bhool hi gya itna bdia explanation hota hai apka question ko approach krne ke tarike ko smjhane ka. Only kal ka problem mujhe thoda sa kam samajh me aya tha but apne aj usko akdm hlva (easy) bna dia❤. Thank you so much bhaiya for such type of explanation. This is unique channel on KZbin which is providing this type of really good content. Thank you so much again bhaiya🙏. You had make me fall in love with DSA.😅
@codestorywithMIK
@codestorywithMIK Ай бұрын
This means a lot. Thank you so much ❤️🙏
@gauravmundhada1647
@gauravmundhada1647 Ай бұрын
Used this approach to solve yesterday's problem, quite easy to understand. Please keep the video descriptive, helps to understand in depth.
@codestorywithMIK
@codestorywithMIK Ай бұрын
Sure ❤️
@Kaushikee1
@Kaushikee1 Ай бұрын
​@@codestorywithMIK Bhaiyaa bss video ko beginner friendly rakhna...... And thank you so much ❤❤ hme itna acha content free me provide krne ke liye ...God bless you 💐✨
@codestorywithMIK
@codestorywithMIK Ай бұрын
Definitely. 😇🙏
@justanuhere
@justanuhere Ай бұрын
pls dont say sorry aapka calender1 explanation was amazing !!!
@AbhijeetMuneshwar
@AbhijeetMuneshwar Ай бұрын
Respected MIK Sir, Please don’t say sorry. We’re fortunate to have a teacher like you 😇
@futuregroup7304
@futuregroup7304 Ай бұрын
Listened to your approach and coded it own my own, it is worked in first attempt. Proud moment for me. I was always afraid of leetcode. Then I listened to a piece of advice "Solving your 100th problem won't be as difficult as solving your 1st problem" + I found your channel (It's truly a GEM). Now I am 4 days away from 300 days streak and have Improved a lot! Thanks Sir❤
@nehasinghggpl9637
@nehasinghggpl9637 Ай бұрын
You are damm awesome..please bhaiya never let your confidence down..
@codestorywithMIK
@codestorywithMIK Ай бұрын
Means a lot to me ❤️🙏
@dazlingwiz
@dazlingwiz Ай бұрын
great explanation of the problem sir. I agree kal wala problem thhoda dimag ke upar se gya
@codestorywithMIK
@codestorywithMIK Ай бұрын
❤️🙏
@EB-ot8uu
@EB-ot8uu Ай бұрын
don't worry sir. we all know you are so good and no one teaches like you. You made it simple and easy to understand
@gamingshorts6433
@gamingshorts6433 Ай бұрын
Sir iss question ki Sweep Line algorithm wali approach pe bhi ek video bna do.
@amitkumarthakur5265
@amitkumarthakur5265 Ай бұрын
Yes, I also feel the same about yesterday's video, but no worries, every day is not your day. Btw your explanation was good.
@harshittaneja471
@harshittaneja471 Ай бұрын
Bit simpler without creating the functions vector doublebooking; vector bookings; MyCalendarTwo() { } bool book(int start, int end) { // check if triple booking is being created or not for(int i=0;i
@DurgaShiva7574
@DurgaShiva7574 Ай бұрын
God of dsa may be found, but you are the only one who is God of dsa + teaching 🎉
@Anime-ub7vs
@Anime-ub7vs Ай бұрын
After watching this video i solved calendar -1 problem . thanku bhiya
@codestorywithMIK
@codestorywithMIK Ай бұрын
Most welcome 😊
@vinayjoshi8714
@vinayjoshi8714 Ай бұрын
greatly explained 🥰🥰🥰
@rockykumarverma980
@rockykumarverma980 Ай бұрын
Thank you so much Bhaiya ji🙏🙏🙏
@SaurabhSinghyadav-r4y
@SaurabhSinghyadav-r4y Ай бұрын
Best explanation sir. Thank you
@GauravDuseja-t6q
@GauravDuseja-t6q Ай бұрын
Best explanation bhaiya
@codestorywithMIK
@codestorywithMIK Ай бұрын
This means a lot ❤️🙏 Thank you for the feedback
@rickdutta942
@rickdutta942 Ай бұрын
Easy and West MIK is best💗💗
@souravjoshi2293
@souravjoshi2293 Ай бұрын
you are the best tutor
@anuragprajapati3712
@anuragprajapati3712 Ай бұрын
nice explanation
@wearevacationuncoverers
@wearevacationuncoverers Ай бұрын
0:27 -> This shows you not only make videos for views, but you actually care. Thanks and amazing explanation. Could solve it easily after understanding the approach
@HarshalYallewarxWF
@HarshalYallewarxWF Ай бұрын
nice explain
@aniketnama8390
@aniketnama8390 Ай бұрын
hey guys here is the code of My Calendar I class MyCalendar { public: vectoroverallbooking; bool checkoverlap(int start1,int end1,int start2,int end2){ return max(start1,start2) < min(end1,end2); } MyCalendar() { } bool book(int start, int end) { for(pairregion : overallbooking){ if(checkoverlap(region.first,region.second,start,end)){ return false; } } overallbooking.push_back({start,end}); return true; } };
@Its_Shubham_Negi
@Its_Shubham_Negi Ай бұрын
Bhaiya Plzzz Nooo..... You dedicated your 40 minutes, not only to just solve a question, but also to explain a new concept (lower bound in pairs), which I highly appreciate. If your video would be of 1 hr, I would still love to learn a new concept from that lecture..... That lecture was not over descriptive...never never ever say sorry again 😢❤
@aws_handles
@aws_handles Ай бұрын
At 11:18, I stopped the video and coded it up 🥺 Love you MIK sir. You are the best
@gagandeepgarg9440
@gagandeepgarg9440 Ай бұрын
Hey your videos are awesome. This solution seems specific to triple booking. interviewer can ask for n number of booking. Can you please think of such scenario and provide solution for that. Thanks
@brokegod5871
@brokegod5871 Ай бұрын
Bhaiya can you make a playlist separately for intervals from your previously solved questions on this topic
@PawanKumar-ri3eq
@PawanKumar-ri3eq Ай бұрын
My Calendar III pe bhi ek video banaiye bhaiya please...
@ApnaPaisa-o5d
@ApnaPaisa-o5d Ай бұрын
Sir If maximum 5 overlappings are allowed then Do we have to make 5 arrays ? Please help someone that if Allowed overlappings increases then what will be the feasible approach..!? Thanks In advance.
@HarshalYallewarxWF
@HarshalYallewarxWF Ай бұрын
learn line sweep algorithm for n overlappings
@lover4924
@lover4924 Ай бұрын
Thank u so much sir, very nice explanation sir which app u use for teaching can please tell
@codestorywithMIK
@codestorywithMIK Ай бұрын
Thank you. I use ipad11 pro and apple pencil and default Notes app
@kartikkaushik4743
@kartikkaushik4743 Ай бұрын
Hi Mik will it be possible for you to cover the problem related GFG On Problems of the day it will be really helpful if it will be possible I am asking it because I am from mechanical branch and just started DSA by following your channels playlist
@shaswataroy6256
@shaswataroy6256 Ай бұрын
Bhaiya ek video pattern recognition pe bhi bana do jis se hame fatak se pata chal jay yehh question konsi topic se belong karta he 😁😁🙏🙏
@anubhavsharma398
@anubhavsharma398 Ай бұрын
thanks bhaiya for these wonderful solutions... Can you help me how your record good audio on ipad as I also want to start recording on my ipad?
@jeehub041
@jeehub041 Ай бұрын
Ist view as always ❤ but very disheartened to not get placement 😢
@codestorywithMIK
@codestorywithMIK Ай бұрын
Don’t worry. Keep going and it will all fall in place ❤️
@TY_A_34_Prasad
@TY_A_34_Prasad Ай бұрын
Please give detailed TimeLine of Video... like then we can see where you are explaining and where is the code.... in the video... I think, there is feature of KZbin to insert timelines in video... while uploading...
@yuvrajbhati3509
@yuvrajbhati3509 Ай бұрын
sir i think max 10 minutes for easy or medium prob and max 15 minutes for hard prob would be sufficient
@Ash-fo4qs
@Ash-fo4qs Ай бұрын
a minor suggestion - the voice of the video has lot of base. if it can be reduced
@rachitthakur9454
@rachitthakur9454 Ай бұрын
Sir can you share how to join your company as fresher from btech cse department as my subject is cyber can you please guide how to prepare for that
@abhinay.k
@abhinay.k Ай бұрын
Thanks
@aizad786iqbal
@aizad786iqbal Ай бұрын
no worries man for yesterday's video but yeah I did had doubts on how this lower and upper bound is working for an array of start,end , (JAVA) is it only taking start time into consideration ?
@codestorywithMIK
@codestorywithMIK Ай бұрын
Sorry i missed to reply. In C++, the lower_bound and upper_bound functions work with pairs in a similar way as they work with other data types. These functions are typically used with sorted containers such as std::vector or std::set. When using std::pair in a sorted vector and calling lower_bound or upper_bound, the comparison is done lexicographically. This means: The first elements of the pairs are compared first. If the first elements are equal, the second elements are compared. 1. lower_bound: lower_bound(first, last, value) returns an iterator to the first element in the range [first, last) that is not less than (>=) the specified value. In case of pairs, it will find the first pair where both the first element is not less than the specified first value and the second element is not less than the specified second value (lexicographically). 2. upper_bound: upper_bound(first, last, value) returns an iterator to the first element in the range [first, last) that is greater than (>) the specified value. For pairs, it will find the first pair that is lexicographically greater than the specified value.
@gui-codes
@gui-codes Ай бұрын
@@codestorywithMIK Please make a short video on teaching more about lower_bound and upper_bound
@higuys450
@higuys450 Ай бұрын
I am not able to be consistent, I try so hard to get some time for DSA, but due to my college, i barely get time for semester subjects. What do I do ?
@Ash-fo4qs
@Ash-fo4qs Ай бұрын
like in my calendar 1 - we took ordered set - we wanted sorted order how to decide here we don't want that.
@Mohit_Q
@Mohit_Q Ай бұрын
please start providing the pdf of lech
@VivekYadav-h6z
@VivekYadav-h6z Ай бұрын
🙏
@ayushraj-lt4oc
@ayushraj-lt4oc Ай бұрын
Time Complexity should be o(n*n) .
@rajchinagundi7498
@rajchinagundi7498 Ай бұрын
This is how i wrote :```class MyCalendarTwo { public: vector doubleBook; vector singleBook; MyCalendarTwo() { } bool checkOverlap(int a1,int b1,int a2,int b2){ return max(a1,a2)
@anikbiswas8
@anikbiswas8 Ай бұрын
class MyCalendarTwo { public: setinterval; setoverlap; MyCalendarTwo() { } bool book(int start, int end) { auto it=overlap.lower_bound({start,end}); if(it!=overlap.end()&&it->firstsecond>start) return false; } pairintersect={start,end}; it=interval.lower_bound({start,end}); if(it!=interval.end()&&it->firstfirst,start),min(it->second,end)}); intersect={min(it->first,intersect.first),max(it->second,intersect.second)}; interval.erase(it); } if(it!=interval.begin()){ auto p=prev(it); if(p->second>start){ overlap.insert({max(p->first,start),min(p->second,end)}); intersect={min(p->first,intersect.first),max(p->second,intersect.second)}; interval.erase(p); } } interval.insert(intersect); return true; } }; why is it not working?
@aws_handles
@aws_handles Ай бұрын
And please don’t be sorry 0:31 ❤
@Abhi_008
@Abhi_008 Ай бұрын
This is not a optimal approach ?
@aizad786iqbal
@aizad786iqbal Ай бұрын
My calnedar III kal ka POTD ho sakta hai , u can cover* that in advance :D
Defuse the Bomb | Detailed for Beginners | Leetcode 1652 | codestorywithMIK
21:21
Ice Cream or Surprise Trip Around the World?
00:31
Hungry FAM
Рет қаралды 18 МЛН
HELP!!!
00:46
Natan por Aí
Рет қаралды 70 МЛН
I Solved 1583 Leetcode Questions  Here's What I Learned
20:37
ThePrimeTime
Рет қаралды 728 М.
Microservices are Technical Debt
31:59
NeetCodeIO
Рет қаралды 632 М.
Making an Algorithm Faster
30:08
NeetCodeIO
Рет қаралды 145 М.
Beginners Should Think Differently When Writing Golang
11:35
Anthony GG
Рет қаралды 121 М.
LeetCode was HARD until I Learned these 15 Patterns
13:00
Ashish Pratap Singh
Рет қаралды 565 М.