Тёмный
No video :(

Sliding Window Technique - Algorithmic Mental Models 

Ryan Schachte
Подписаться 39 тыс.
Просмотров 344 тыс.
50% 1

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

 

29 авг 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 398   
@omkarpat
@omkarpat 4 года назад
One of the best explanations of this concept. Please make some more "Algorithmic Mental Models" based videos.
@CEOofTheHood
@CEOofTheHood 3 года назад
dude u seriously need to make more of these. Ill pay for them.
@andrewblaines
@andrewblaines 3 года назад
Agreed! These are great. More "Algorithmic Mental Models" for dynamic programming, backtracking, etc. would be extremely helpful. Thanks for the video!
@veliea5160
@veliea5160 3 года назад
it is not one of the best, it is the best
@Mogwai88
@Mogwai88 3 года назад
@@CEOofTheHood Yes. Please make more of these. Especially with your new freecodecamp traffic this would really take off.
@AhmadRafique-yn8ry
@AhmadRafique-yn8ry 20 дней назад
Agreed
@jacktrainer4387
@jacktrainer4387 4 года назад
I've never before seen a CS video that approached CS like math (i.e., here are the concepts, here are some keywords to look out for so you know when to apply these concepts, here are a few examples). The world needs 1,000 more videos like this (DP, Linked Lists, Trees, Graphs, etc). Fantastic work!
@maxdrojjin6984
@maxdrojjin6984 5 лет назад
This is really the best video (or any, really) explanation of the topic I have found. Really hope this would become more popular. Thank you!
@fahadhayat_
@fahadhayat_ 3 года назад
Dude please create a playlist for the other techniques as well!!! This is gold!
@zappist751
@zappist751 Год назад
Does he have a playlist for this?
@maggiesayabie
@maggiesayabie 4 года назад
Who even has the audacity to dislike such a video?? The best and simplest explanation of sliding window concept i have ever come across. Thank you sir!
@priyamrai5915
@priyamrai5915 7 месяцев назад
will it work if array has negative elements. I think no.
@divyanirao4279
@divyanirao4279 4 года назад
This video is amazing. hope you make more videos on "mental models" such as for dynamic programming.
@michadobrzanski2194
@michadobrzanski2194 3 года назад
Max subarray sum of k is also a dynamic programming problem. You reuse the previous max result and update it. So it is like dynamic programming with space complexity O(1).
@shriduttkothari
@shriduttkothari 2 года назад
This is the only video which made me understand dynamic window sizing algorithm... Thank you so much 🥰
@pjmiravalle
@pjmiravalle 2 года назад
I came across this video after struggling with sliding window problems in preparation for my upcoming Google interview, and just wanted to thank you for the super clear explanation. I'm feeling much more confident with these problems now. 👍
@tomrobinson8290
@tomrobinson8290 Год назад
Did you get into google? How was the interview!?
@sujityadawad
@sujityadawad 4 года назад
Was struggling a lot with sliding window problems earlier, your explanation really simplified those problems. I really appreciate your effort. Thank you! Please post more videos.
@frozen_tortus
@frozen_tortus 4 года назад
I'm absolutelly blown away how this is explained.
@silvahawk
@silvahawk 3 года назад
I have always been calculating the first windowSum in a separate loop before starting to "move" the window in a separate loop. I never knew you could do both within the same loop without using a nested loop. This is amazing!
@SauravTiru
@SauravTiru 21 день назад
Learning from you to for my job hunt in Zurich, I shall get back to this video once I get my job ! Thanks in advance for everything!
@sedgeralt
@sedgeralt Год назад
Hands down the best explanation of the Sliding Window technique. Please do more algorithmic mental model videos!
@dr_920
@dr_920 4 года назад
One of the best tutorials I have even seen. Thanks.
@cse9003
@cse9003 25 дней назад
why suddenly when i graduated all these channels poped up when i needed them the most , bro you are the best
@shrey4489
@shrey4489 2 года назад
Great explanation! I'm a visual learner and I can see myself imagining these sliding window animations when I face array problems like this in the future.
@ibrahimhegazi3955
@ibrahimhegazi3955 Месяц назад
You might be a professor or a normal student, but your explanation skills are exceptional. Add to that most of the videos explaining algorithms do not include such an amazing visualization for the data structures that we are working with. I hope one day you will have the free time to make a full algorithms and data structures for competitive programming course with such an amazing visualization. Hope you the best sir whereever you are.
@nan5715
@nan5715 4 месяца назад
I like that you actually name your variables in a meaningful way. 👍
@saugatkarki3169
@saugatkarki3169 4 месяца назад
I looked into it and looks like this "Algorithmic mental models" video is the most viewed video on your channel. Upon reading the comments, people seems to really love it and are asking more of it covering other topics. Genuinely curious, why didn't you make more of this type of vide, that clearly seems to be the most viewed one on your channel?
@syedaffanhameed14
@syedaffanhameed14 2 года назад
I found "Algorithmic mental models" is a great concept for solving problems please bring more videos like this.
@parthabhowmik4747
@parthabhowmik4747 2 года назад
The best lecture on sliding window technique
@vicente3j
@vicente3j Год назад
Only 219k views... no way. This is by far some of the best CS-related content on RU-vid, hands down. Amazing!!
@TheDev05
@TheDev05 2 года назад
The animation for second technique: dynamic SW is just awesome, I loved it
@potatocoder5090
@potatocoder5090 Год назад
I have struggled with this concept for a really long time, but not anymore :) Your explanations were absolutely beautiful and I'm excited to solve some sliding window problems now! Can you please create more Algorithmic Mental Model videos? We'd all be super grateful!
@svdfxd
@svdfxd 5 лет назад
One of the The best videos to explain Sliding windows concept. Request you to make other such videos that will help in tech interviews.
@TheN8H
@TheN8H 4 месяца назад
I've really struggled visualizing this algorithm concept and this video is extremely intuitive and detailed. Would love to have more of these videos.
@Finn-jp6pn
@Finn-jp6pn 4 года назад
Would love more of these 'Algorithmic Mental Models' videos. I'm sure everyone here would appreciate them.
@Finn-jp6pn
@Finn-jp6pn 4 года назад
@maryam I'm sure there are more capable people here who can help you. I don't have much experience with Python.
@uzvalmallepeddi8962
@uzvalmallepeddi8962 3 года назад
I wouldn’t resist to pay a 1000$ to watch such videos. Brilliant piece of work! Hope you do more videos on “Mental models”
@ShivamJha00
@ShivamJha00 Год назад
After watching this one, I could solve even the hard LC problems within 15-20 mins. This is a gem of a video on this topic. Hope you make more of these on other topics, I will literally pay for it
@weijinghuang8518
@weijinghuang8518 2 года назад
This is the best video I've ever seen on this topic "sliding window"! It does not only solve one or two interview questions for me but also solves a group of problems. More than that, it teaches me how to spot this group of problems. Fantastic!!!
@for461
@for461 2 месяца назад
you are a very good teacher in layman language you are reaching. We will surely crack interviews with these
@MrAlmas01kz
@MrAlmas01kz 2 года назад
One of the best and easy explanations of this concept. thank you so much !
@for461
@for461 2 месяца назад
I am from India. THese are helping us cracking interview. THank you very much. Complicated topics you are making us understand very easily.
@neerajkulkarni6506
@neerajkulkarni6506 3 года назад
This is fantastic! Please make more of these 'mental model' videos. There too many videos out there that jump straight to the solution without any discussion of how to approach and generalize a problem. We need more video's like this!
@billyfigueroa1617
@billyfigueroa1617 6 месяцев назад
What an excellent, well paced, well explained video with explaining the theory but also showing it in examples THANK YOU! The more you research the more you come to understand that trying to solve all these problems individually with out knowing about techniques like these, is so painful lol
@rafaeldietrich8050
@rafaeldietrich8050 Год назад
This is probably hands down the best explanation of the Sliding Window technique i've seen. Great job!
@ionguzun3952
@ionguzun3952 Год назад
agree 100%!
@codesefod8527
@codesefod8527 2 года назад
1. Liked 2. Subscribed 3. Notifications Turned On. Please keep posting, one of best the best explanations for sliding window problems. Thank You Ryan!
@francksgenlecroyant
@francksgenlecroyant 11 месяцев назад
Thank you @Ryan Schachte for clarifying the sliding window technique and make it so simple just like that. I hope you upload a lot more vids like this bro !
@thatChillLife2037
@thatChillLife2037 3 месяца назад
dude I am only 2 minutes in and I've liked and subscribed! Between the visuals and your consice explanations, the sliding window technique (which I never thought I'd understand) makes SO MUCH SENSE! Thanks so much :)
@billycheung7095
@billycheung7095 Год назад
Thanks you with tear. You constructed a solid framework for handling sliding window in my head.
@igcmjoeabar8475
@igcmjoeabar8475 3 года назад
Guys, seriously, just study this video! It will help tremendously!!! Thanks for such helpful content
@rahulkushwaha7742
@rahulkushwaha7742 2 года назад
I struggled for longest substring problems and now here we are i solved it by my own after watching your video thanks buddy
@alphapenguin9748
@alphapenguin9748 4 года назад
Please make more algorithm videos, you're literally the best explainer I have found on youtube.
@omaryahia
@omaryahia 2 года назад
a simple visual explanation, detailed, with variants this is amazing, thank you
@yasirayaz7832
@yasirayaz7832 2 года назад
Nice explanation. I am glad I landed here while searching for all possible solutions for solving the array problems
@vincenthou6459
@vincenthou6459 Год назад
This is such an awesome video by abstracting the idea of sliding window to tackle a group of specific issues with similarities. Regarding the question of smallest subarray for a given target, I think we need to add the constraint that every element in the array is positive. Otherwise, the sum can be reduced even if we grow the size of the window without dropping the front one. 28:37
@akhalil3482
@akhalil3482 2 года назад
we need more of this series! please do more!
@danielc4267
@danielc4267 4 месяца назад
31:11 The reason you "add 1" isn't because the array is indexed at 0. It's because the start element gets subtracted and it needs to be added back. Thank you for making the video :)
@yynnooot
@yynnooot 2 года назад
Do you have a series for these Algorithmic Mental Models? Your video was extremely helpful and I would love to see more of these!
@pravinyadav8372
@pravinyadav8372 2 года назад
This video gave the confidence that I'll mostly won't stuck in this topic anymore...Thank you : )
@plashless3406
@plashless3406 Год назад
This is amazing. I wish I could hug you for this best explainantion. I learned a lot.
@TaraChand-eg6uk
@TaraChand-eg6uk 2 года назад
@Ryan : In case of smallestSubarray method, if targetSum is 9, it is failing, need to add another condition in it. private static int smallestSubarray(int targetSum, int[] input) { int currentWindowSum = 0; int minWindowSize = Integer.MAX_VALUE; int windowStart = 0; for (int windowEnd = 0; windowEnd < input.length; windowEnd++) { currentWindowSum += input[windowEnd]; while (currentWindowSum >= targetSum && windowEnd > windowStart ) { minWindowSize = Math.min(minWindowSize, windowEnd - windowStart + 1); currentWindowSum -= input[windowStart]; windowStart++; } } return minWindowSize; }
@abduuhany
@abduuhany 3 месяца назад
I love the idea of "Algorithmic Mental Models"! Thank you so much for explaining this perfectly and I'd love to see more videos for this idea!
@peacebakare
@peacebakare 2 года назад
This is the best explanation on Sliding Window I have seen so far. Thank you for the detailed yet simple approach to explaining the concept.
@user-mq8dn1pv3v
@user-mq8dn1pv3v 9 месяцев назад
very declariative and well explained , thanks
@SantoshPrajapati-ps9nj
@SantoshPrajapati-ps9nj 5 месяцев назад
This is the best explaination that i have came across 🙂
@Sedri14
@Sedri14 Год назад
Best explanation so far. Thank you
@cocoarecords
@cocoarecords 3 года назад
wow this deserve to be a series very underrated!
@alonbrim
@alonbrim 2 года назад
This video is pure gold!!! Great explanation . Everything is very clear. Thank you very much!
@brenoaps
@brenoaps 4 месяца назад
A series of algorithmic mental models would be awesome, great work!
@waseemmn2007
@waseemmn2007 5 месяцев назад
OMG, Best problem solving explanation I've ever seen. it is a really helpful, simple, and to the point, Thank you for this extraordinary video. Liked and subscribed 🙌
@harshitmittal1217
@harshitmittal1217 4 года назад
Literally the best explanation of sliding window technique.
@andrewgraham3119
@andrewgraham3119 Год назад
Great explanation. It really helped me to fully understand
@Mop_Deep
@Mop_Deep 2 года назад
It's been three years since you dropped this video. I wish you would cover the other patterns.
@TheSimpleEngineer
@TheSimpleEngineer 2 года назад
What patterns are you interested in?
@Mop_Deep
@Mop_Deep 2 года назад
@@TheSimpleEngineer Like the ones in "Grokking the Coding Interview: Patterns for Coding Questions". You explained this to me so well. Would be dope if you did that for patterns from that list. i like your teaching style my friend. I would pay money if you had a course explaining those.
@TheLucidWay
@TheLucidWay 2 года назад
@@TheSimpleEngineer Hi, Ryan. Hope you can clear something up for me. The solution for smallestSubArray isn't O(n^2) because you aren't looping over the array in the while loop, correct? You're just looping until the condition is no longer true. Is that right, or am I totally off?
@leonardo_magallanes
@leonardo_magallanes Год назад
Thank you so much for this video, I helped me a lot to understand this concept better.
@muskulanikhil3623
@muskulanikhil3623 Год назад
Fantastic, you should seriously consider doing dynamic programming series. Just 36 mins but got avery clear understanding of the topic
@back2bits
@back2bits 7 месяцев назад
This is -by far- the best video on this topic I have seen. Thanks for taking the time to produce such a great content. Keep it up!
@WhosShamouz
@WhosShamouz Год назад
Rewatched some parts of it. Perfect, breathtaking. The best tutorial ever.
8 месяцев назад
Thanks, I flew through LeetCode Sliding Window challenges after watching this.
@amitrajitdas31
@amitrajitdas31 2 года назад
One of the best explanation on YT
@ethanwu7338
@ethanwu7338 2 года назад
Dude, thank you so much for making those videos!
@sivanyaniv64
@sivanyaniv64 2 года назад
this is the best video I was watching about sliding window - thank you !!
@DonMamaril
@DonMamaril 5 лет назад
I loved, looooved the format of this! Please continue to do these videos. Extremely helpful!!
@Ore00000
@Ore00000 3 года назад
I greatly appreciate the clear explanation of the dynamically resizable sliding window, it cleared up some doubts I have about the algorithm. Cheers!
@SolamanRaji
@SolamanRaji 3 года назад
Great explanation and example of sliding window.
@sierraobi311
@sierraobi311 11 дней назад
Please do! I want to recommend them to all my friends.
@Maybec
@Maybec Год назад
Thank you for your help. Please add more videos to the algorithmic mental models series. please and thank you!
@davidodia4603
@davidodia4603 3 года назад
Incredibly simple explanation. I felt like a baby being handed his lego building blocks. I absolutely learnt a hitherto abstract concept, i will never forget.
@B-Billy
@B-Billy 6 месяцев назад
Hand down, the best explanation. Great work🎉 thank you❤
@debugquan
@debugquan 2 года назад
Great guy. I was hesitant to watch the whole video but you were so informative that I actually learned something for many use cases. Thanks
@martinlacsamana7534
@martinlacsamana7534 Год назад
Only 13 minutes in but this is beautiful so far. Thank you.
@GoblinBlaster3000
@GoblinBlaster3000 2 года назад
Great explanation, didn't know anything about sliding window before this video and I got enough information where I could implement it no problem.
@danielstatler954
@danielstatler954 Год назад
first vid i see on this channel and its wonderful. good job!
@dolicious
@dolicious 3 года назад
this was such a good explanation !! I hate Java but through your explanation I was able to understand what each line of code was doing. Even pointing out certain words that give away how one should solve the problem. Looking forward to future algo breakdowns !
@alivation3409
@alivation3409 2 года назад
Same! I know this is an old comment, but I was able to mentally translate this into the programming languages I do know algorithms in. This is a great video.
@drkenny7928
@drkenny7928 2 года назад
for python lovers on the first question cur = 0 _max = cur t = [4,2,1,7] for i in range(len(t)): cur = sum(t[i:i+3]) if cur > _max: _max = cur else: cur = cur print(_max)
@klaaskabini5407
@klaaskabini5407 2 года назад
Best explanation so far. Please make more videos on algorithmns
@ridhwaans
@ridhwaans 3 года назад
for the max subarray problem you can also use the slice function between i and k and quit when k is greater than array length
@CantBeTamed53
@CantBeTamed53 2 года назад
Great use of graphics to explain the algorithm! :D
@TechieIndia
@TechieIndia 4 года назад
the best lecture available on any platform for SWT. I loved this video and your way of explanation.
@danielderese3170
@danielderese3170 2 года назад
I can't thank you enough. I wish I have seen this video before I bombed in the Meta interview. Please make more videos on Algorithmic Mental Models!!!
@SushilDubey171
@SushilDubey171 4 года назад
This is the best video for sliding window techniques
@Ebizzill
@Ebizzill 4 года назад
this was hands down the best explanation of this godforsaken concept i've been trying wrap my mind around for the longest.
@victorklimov3175
@victorklimov3175 Год назад
Thank you for GREAT explanation!
@airysm
@airysm 3 года назад
This video just came up in my recs as I'm interview prepping and I'm so mad this is your only video like it! I thought I hit a goldmine for interview prep for a sec LOL, but nonetheless this video is amazing. Thank you so much
@TheSimpleEngineer
@TheSimpleEngineer 3 года назад
More to come ;)
@findMeOnYoutube350
@findMeOnYoutube350 4 года назад
You are one of the best online tutor Man, I really appreciate it. Thanks for your contribution. Subscribed :)
@TheSimpleEngineer
@TheSimpleEngineer 4 года назад
Thanks for the kind words Roshan!
@IljaMichajlow
@IljaMichajlow 2 года назад
It is the best explanation for this topic!
@nehashimpi7643
@nehashimpi7643 3 года назад
This is the best video I have seen!!Please please please make more videos on Algorithm Models!!
@shivsakthi37
@shivsakthi37 Год назад
Wow I was amused by your teaching it all went straight into the head. Somehow RU-vid algorithm suggested this gem 💎 . The fact that this video was made 4 years ago great content bro 🎉 🥳.Would be great if you make some more 'mental model' videos thank you, stay in good health ❤
@shuvbhowmickbestin
@shuvbhowmickbestin 2 года назад
what a comprehensive video! Learnt a lot, liked and subbed. Keep bringing new content, you teach really good!
@rozikrazimator
@rozikrazimator 2 года назад
Thank you, Ryan! Your explanation and visuals are simply great.
Далее
How DNS Works Visually
10:46
Просмотров 76 тыс.
LeetCode was HARD until I Learned these 15 Patterns
13:00
JavaScript Sliding Window Technique - Fixed Size
15:19
How to Solve ANY LeetCode Problem (Step-by-Step)
12:37
Просмотров 190 тыс.
Sliding window technique - Inside code
9:07
Просмотров 59 тыс.
Faster than Rust and C++: the PERFECT hash table
33:52
Просмотров 551 тыс.
Most Common Concepts for Coding Interviews
6:08
Просмотров 306 тыс.