Тёмный

Minimum Window Substring | Sliding Window | LeetCode 

AlgosWithMichael
Подписаться 21 тыс.
Просмотров 40 тыс.
50% 1

Опубликовано:

 

9 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 96   
@christopherreyes3896
@christopherreyes3896 3 года назад
I don’t usually comment but I want you to know these are very helpful, well explained, and entertaining! Thanks man.
@AlgosWithMichael
@AlgosWithMichael 3 года назад
Thank you Chris! I'm not much of a commenter either when I am on RU-vid as a viewer either haha so I appreciate that
@megatronislive1331
@megatronislive1331 8 месяцев назад
Cat !! The coder. Thank you catty for such a wonderful explanation
@kevindebruyne17
@kevindebruyne17 3 года назад
Wow can't believe this cat is solving LC hard problems! Purrfect interviewee.
@AlgosWithMichael
@AlgosWithMichael 3 года назад
Haha yea he is a LeetCode master
@mehdiLesty
@mehdiLesty 2 года назад
I like the way you explain using algorithm walkthrough before coding (the coding part becomes naturally understandable since your first visual explanation is clear). Thumb smashed.
@AlancRodriguez
@AlancRodriguez 2 года назад
I really like the visual effects you have implemented, not a lot of other RU-vidrs have this
@AlgosWithMichael
@AlgosWithMichael 2 года назад
Thank you!
@MsSkip60
@MsSkip60 3 года назад
Great explanation thanks! Loved the cat part :D
@AlgosWithMichael
@AlgosWithMichael 3 года назад
Thank you very much! best comment
@kumarc4853
@kumarc4853 3 года назад
for harder problems we come to Michael
@sata1938
@sata1938 Год назад
Well done. I like that you spoke clearly, slowly and methodically. A lot of other similar types of videos have the narrator jumping around and explaining the solution on the fly. I really liked your intentional approach and how you visualized everything neatly.
@ShashankRustagiCSE
@ShashankRustagiCSE 2 года назад
Honestly saying, I sighed when you said the most difficult to digest part of the algo is when we shrink the window and start incrementing when we find the characters in the map. You were right. Now i get the whole crux of the algorithm. This question was asked in Codenation(trilogy Innovation)
@AlgosWithMichael
@AlgosWithMichael 2 года назад
Yeah it is pretty hard to conceptualize, looking at an animated example really helped
@ShashankRustagiCSE
@ShashankRustagiCSE 2 года назад
@@AlgosWithMichael if you are on LinkedIn, please drop me your id
@afnanrehman866
@afnanrehman866 5 месяцев назад
Thanks for the upload
@interviewprep6827
@interviewprep6827 3 года назад
Very clear explanation.. Actually 2 days back I saw this question on leetcode and was searching your channel to find the video... U read my mind.. Thanks a lot...
@AlgosWithMichael
@AlgosWithMichael 3 года назад
Haha that is awesome, glad it was helpful
@happyl4463
@happyl4463 3 года назад
I was totally distracted by your cat lol
@AlgosWithMichael
@AlgosWithMichael 3 года назад
He wouldn't move when I was about to film, so he had to do it :p
@girlingame518
@girlingame518 3 года назад
i subscribed because of your cat 😁 , great explanation
@AlgosWithMichael
@AlgosWithMichael 3 года назад
Thank you!
@Manishgupta200
@Manishgupta200 11 месяцев назад
That's understable. Thankyou
@juliahuanlingtong6757
@juliahuanlingtong6757 3 года назад
Greatest explanation and demonstration on sliding window!
@AlgosWithMichael
@AlgosWithMichael 3 года назад
Thank you!
@gunahawk6893
@gunahawk6893 Год назад
glad i found ur channel
@hawaijarmayengbam4451
@hawaijarmayengbam4451 2 года назад
Thank you, you made my day!
@jasonli6057
@jasonli6057 2 года назад
super helpful, first time comment in youtube
@tharunkumarreddy1224
@tharunkumarreddy1224 2 года назад
U xplained it in a trivial way !!keep up the good work🙌
@AlgosWithMichael
@AlgosWithMichael 2 года назад
Thank you so much 😀
@boundlesstech5292
@boundlesstech5292 2 года назад
The smartest cat on the internet fasho 🙂 lol
@tylercondon3453
@tylercondon3453 2 года назад
very informative video thank you Michael
@jasonahn8658
@jasonahn8658 Год назад
Best explanation! But HOLY it's difficult haha
@HKCSFARJADAHMEDKHAN
@HKCSFARJADAHMEDKHAN 3 года назад
best explanation you can fi0nd on youtube for this problem . Great job .
@AlgosWithMichael
@AlgosWithMichael 3 года назад
Thank you!
@mridulsetia4974
@mridulsetia4974 2 года назад
Awesome Explanation!! Thanks
@CPAMJIO
@CPAMJIO Год назад
thank you so much!!! great explaination
@williamzayas302
@williamzayas302 2 года назад
This was really helpful! I tried different approaches, but couldn't solve it. A+ for editing. I know how long editing takes and sometimes it's hard. Thanks for step by step explanation. Keep up the good work!! 👍
@AlgosWithMichael
@AlgosWithMichael 2 года назад
I really appreciate that
@Tamilsd629
@Tamilsd629 2 года назад
Great Job Mike!! If you share the code . it will be more helpful.
@abanerjee3704
@abanerjee3704 Год назад
Purrfect!
@hoangchungduyminh7568
@hoangchungduyminh7568 2 года назад
Liked and subscribed. Well-informative video, my applause.
@AlgosWithMichael
@AlgosWithMichael 2 года назад
Thank you!
@gouravbansal994
@gouravbansal994 3 года назад
Great Video Man!
@vinaysimha95
@vinaysimha95 3 года назад
Small correction. I think you meant to say, space complexity is O(M) not O(N). (The length of string T is M)
@AlgosWithMichael
@AlgosWithMichael 3 года назад
Yea you are right haha, thanks for pointing that out
@manuelpineda924
@manuelpineda924 2 года назад
I got this as a coding challenge and failed it :( thank you if I ever encounter this I will be prepared now.
@tjalferes
@tjalferes 2 года назад
Thank you.
@tongwang535
@tongwang535 3 года назад
Thank you very much! Could you talk about some design problems? like LRU
@AlgosWithMichael
@AlgosWithMichael 3 года назад
Great suggestion!
@sitronco
@sitronco 3 года назад
Great video. Thanks for the content
@AlgosWithMichael
@AlgosWithMichael 3 года назад
My pleasure!
@nayemalaboni8318
@nayemalaboni8318 3 года назад
new subscriber you explain very well
@aniruddhkarekar2818
@aniruddhkarekar2818 Год назад
You said we move i pointer forward to get rid of the useless characters from the prefix of our substring then why do we incremented the count at the 0th index which is character A and it should be present in the final answer ???
@B-Billy
@B-Billy 3 года назад
Loved it.. Subscribed!
@AlgosWithMichael
@AlgosWithMichael 3 года назад
Awesome! Thank you!
@user-cw3jg9jq6d
@user-cw3jg9jq6d 6 месяцев назад
where did you get the sound clip for the error?
@karthikVignesh-
@karthikVignesh- 11 месяцев назад
i just cant take my eyese off from that cat
@yy-gf7ze
@yy-gf7ze 3 года назад
You are always amazing AF.
@AlgosWithMichael
@AlgosWithMichael 3 года назад
Haha I appreciate that
@naliniprakash7738
@naliniprakash7738 2 года назад
Coolest Explaination
@ellisbrown3539
@ellisbrown3539 2 года назад
Such a good video.
@AlgosWithMichael
@AlgosWithMichael 2 года назад
Ayy thank you!
@____r72
@____r72 Год назад
Nice cat
@saulgoodman6710
@saulgoodman6710 Год назад
@7:10 around, why did you increase only count of A by 1 in the hasmap? why not other elements?
@sumitvaise5452
@sumitvaise5452 2 года назад
Simply and well put explanation. Thanks
@tusharsaini767
@tusharsaini767 2 года назад
nyc code kitty
@rohinbisht9668
@rohinbisht9668 2 года назад
correction: min length is j - i + 1
@piratesuman
@piratesuman 3 года назад
If the string T was "ABBC" shouldn't the count be 4? map.size() would be 3, right?
@AlgosWithMichael
@AlgosWithMichael 3 года назад
The count is the number of unique characters, so in that example it would still be 3.
@shags91
@shags91 Год назад
This doesn't work if you have t containing multiple same characters. Even if t = "aabc", this algorithm still returns "banc"
@kevinchou1522
@kevinchou1522 2 года назад
The hard part of this problem for me was the recognizing and implementing backtracking optimization... which turns out can be done easily with a count variable haha
@AlgosWithMichael
@AlgosWithMichael 2 года назад
Haha yea. It is a challenging problem for sure
@3pleFly
@3pleFly 2 года назад
I didn't like that the first window size you gave is incorrect, ADOBEC is not 5 length, but 6! , I understand what you're doing but it seems strange to me.
@rohankumarshah5679
@rohankumarshah5679 2 года назад
its not working fine in below test case s = "abc" ; t = "b" ;
@kruthikasm2809
@kruthikasm2809 Год назад
This fails for case where s=aa and t=aa
@bigE595
@bigE595 3 года назад
For time complexity, you say N is length of string S and M is length of string T. For space complexity, you say N is length of string T. Was this a mistake? Why not keep the variable names consistent across time and space complexity? Thanks for the great video, enjoyed watching.
@AlgosWithMichael
@AlgosWithMichael 3 года назад
Yea good point. I guess it is habit for me to N and M for time and space complexity explanations
@amazingsaavya6268
@amazingsaavya6268 3 года назад
I have a question: do we have to face coding interview with experience level 18 years if someone is already working as architect. ? Which companies may do that?
@gunahawk6893
@gunahawk6893 Год назад
how come ur were not visible to me these day man , please when got time do dp problems
@thebluefox100
@thebluefox100 2 года назад
why is 1,6 a valid substring in your video at 7:28 ? it does not contain any 'A'
@gunahawk6893
@gunahawk6893 Год назад
6-1 , 1-1
@amansoni0922
@amansoni0922 3 года назад
There is a nested while(), why is that not accounting for n^2 complexity ? Can anyone pls help me with that !
@AlgosWithMichael
@AlgosWithMichael 3 года назад
Yea I understand why that is confusing. The while loop is moving our 2nd pointer to in the worst case touch each element one time. So in other words in the worst case, each pointer will touch each node 1 time making the time complexity (n + n) which is just n. Hope that makes sense.
@avinashsorab5026
@avinashsorab5026 7 месяцев назад
Who's here from Daily Question 2/3/24? :)
@niranjan08538
@niranjan08538 3 года назад
Quite confusing on updating minLength
@alpati123
@alpati123 3 года назад
Its failing for the inputs as s = "aa" & t ="aa"
@shreyaprajapati969
@shreyaprajapati969 3 года назад
needs to change on line 20: map.get(endChar) >= 0
@ruhigarga9542
@ruhigarga9542 3 года назад
Instead of initializing count = map.size(); you need to initialize count = t.Length();
@gunahawk6893
@gunahawk6893 Год назад
@@ruhigarga9542 +1
@ramsescoraspe
@ramsescoraspe Год назад
remove lyft from your list!! 😉
@londrali8085
@londrali8085 2 года назад
I wanna have 3 copies of that cat. I wanna swallow the first one like a pill, lick the second one for years to come, and just pet the third one for about 12 hours a day. Good explanation, too.
@AM-nv4ol
@AM-nv4ol Год назад
i'm calling the police
@user-el9fl3vc1f
@user-el9fl3vc1f Месяц назад
Bruh u confused me a lot
Далее
Solving Amazon's 2024 Most Asked Coding Question
18:09
Просмотров 1,7 тыс.
Decode String | FAANG Coding Question | Stack
17:03
Просмотров 10 тыс.
Naming Things in Code
7:25
Просмотров 2,1 млн
Dear Functional Bros
16:50
Просмотров 502 тыс.
Solving Amazon's 2020 Most Asked Interview Question
9:57
why are switch statements so HECKIN fast?
11:03
Просмотров 407 тыс.