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.
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...
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.
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)
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!! 👍
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 ???
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
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.
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.
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?
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.
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.
Cat !! The coder.
Thank you catty for such a wonderful explanation
Wow can't believe this cat is solving LC hard problems! Purrfect interviewee.
Haha yea he is a LeetCode master
I don’t usually comment but I want you to know these are very helpful, well explained, and entertaining! Thanks man.
Thank you Chris! I'm not much of a commenter either when I am on UA-cam as a viewer either haha so I appreciate that
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.
I really like the visual effects you have implemented, not a lot of other UA-camrs have this
Thank you!
Great explanation thanks! Loved the cat part :D
Thank you very much! best comment
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...
Haha that is awesome, glad it was helpful
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.
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)
Yeah it is pretty hard to conceptualize, looking at an animated example really helped
@@AlgosWithMichael if you are on LinkedIn, please drop me your id
for harder problems we come to Michael
best explanation you can fi0nd on youtube for this problem . Great job .
Thank you!
U xplained it in a trivial way !!keep up the good work🙌
Thank you so much 😀
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!! 👍
I really appreciate that
i subscribed because of your cat 😁 , great explanation
Thank you!
Greatest explanation and demonstration on sliding window!
Thank you!
super helpful, first time comment in youtube
The smartest cat on the internet fasho 🙂 lol
Thanks for the upload
Liked and subscribed. Well-informative video, my applause.
Thank you!
That's understable. Thankyou
glad i found ur channel
very informative video
thank you Michael
Thank you, you made my day!
thank you so much!!! great explaination
Awesome Explanation!! Thanks
Great Video Man!
I got this as a coding challenge and failed it :( thank you if I ever encounter this I will be prepared now.
where did you get the sound clip for the error?
Great Job Mike!! If you share the code . it will be more helpful.
Best explanation! But HOLY it's difficult haha
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 ???
Thank you very much! Could you talk about some design problems? like LRU
Great suggestion!
Purrfect!
new subscriber you explain very well
Small correction. I think you meant to say, space complexity is O(M) not O(N). (The length of string T is M)
Yea you are right haha, thanks for pointing that out
Loved it.. Subscribed!
Awesome! Thank you!
Great video. Thanks for the content
My pleasure!
You are always amazing AF.
Haha I appreciate that
Thank you.
Such a good video.
Ayy thank you!
I was totally distracted by your cat lol
He wouldn't move when I was about to film, so he had to do it :p
Simply and well put explanation. Thanks
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
Haha yea. It is a challenging problem for sure
why is 1,6 a valid substring in your video at 7:28 ? it does not contain any 'A'
6-1 , 1-1
This doesn't work if you have t containing multiple same characters. Even if t = "aabc", this algorithm still returns "banc"
If the string T was "ABBC" shouldn't the count be 4? map.size() would be 3, right?
The count is the number of unique characters, so in that example it would still be 3.
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.
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.
Yea good point. I guess it is habit for me to N and M for time and space complexity explanations
Coolest Explaination
correction: min length is j - i + 1
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?
how come ur were not visible to me these day man , please when got time do dp problems
There is a nested while(), why is that not accounting for n^2 complexity ? Can anyone pls help me with that !
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.
Nice cat
i just cant take my eyese off from that cat
its not working fine in below test case
s = "abc" ;
t = "b" ;
nyc code kitty
This fails for case where s=aa and t=aa
Its failing for the inputs as s = "aa" & t ="aa"
needs to change on line 20:
map.get(endChar) >= 0
Instead of initializing count = map.size(); you need to initialize count = t.Length();
@@ruhigarga9542 +1
Who's here from Daily Question 2/3/24? :)
Quite confusing on updating minLength
remove lyft from your list!! 😉
You sound like Todd Howard
Bruh u confused me a lot
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.
i'm calling the police