Great teaching Greg but i have a question, what is the need of comparing the max value of w to longest because there is nowhere in the code for Variable Lenght Sliding Window is longest incremented from 0. So can we just give longest = w in replace of finding the max between them
@@GregHogg Yes, I think I was expecting more like recipe/template/framework for solving all sliding window problems after reading title, not just solving 2 leetcode sliding window tasks, Sorry.
@@pjpodx This is the recipe. There's 2 common sliding window types, I say what they are, and explain how to solve an example for each. Not sure what else there is, am I missing something?
Master Data Structures & Algorithms For FREE at AlgoMap.io!
Hey Greg, you're content and way of explaining make me feel like DSA is easy
Glad to hear it!
Greg just keep making these videos man you are just awesome ❤
Glad to hear it!
Amazing explanation. Thanks!
you are so talented.
Great teaching Greg but i have a question, what is the need of comparing the max value of w to longest because there is nowhere in the code for Variable Lenght Sliding Window is longest incremented from 0. So can we just give longest = w in replace of finding the max between them
Thanks ❤
What is the name of the tool you use to draw stuff out?
Hey in first problem why did we specifically used set, I tried it with a list and it was actually better since list are more easier to work with
That would make the time complexity of your solution O(n^2). When you try to do a search in a list it is O(n), whereas search in a set is O(1)
it feels illegal to watch because of its simplicity with DSA
what about different sliding windows types/patterns: fixed length, caterpillar, shrinking /expending rules ?
Did you watch the video?
@@GregHogg Yes, I think I was expecting more like recipe/template/framework for solving all sliding window problems after reading title, not just solving 2 leetcode sliding window tasks, Sorry.
@@pjpodx This is the recipe. There's 2 common sliding window types, I say what they are, and explain how to solve an example for each. Not sure what else there is, am I missing something?
First😊