Sliding Window Technique - Algorithmic Mental Models
Please support me on Patreon: https://www.patreon.com/thesimpleengineer
https://twitter.com/thesimpengineer https://www.linkedin.com/in/schachte/
https://ryan-schachte.com
Don't forget to subscribe! Code:
https://gist.github.com/Schachte/87d7c0165a584f26b3ad7845f8010387
In this video, we'll begin our series of algorithmic mental models and cover the idea behind the sliding window technique. This technique allows us to reduce a typical n^2 algorithm to a linear time algorithm with minimal effort. This exploits linear time optimizations on data structures that deal with iteration and group sequential pieces of data together.
More resources:
https://medium.com/@zengruiwang/sliding-window-technique-360d840d5740
https://thesimpleengineer.com
https://stackoverflow.com/questions/8269916/what-is-sliding-window-algorithm-examples
*Timestamps*
00:00 Welcome
8:25 Maximum sum of contiguous subarray of size 3.
16:35 Question variants
24:50 Dynamic variant. Smallest subarray with given sum.
27:45 Smallest subarray code start
32:48 Smallest subarray solution
33:20 Longest substring with length k distinct characters
Видео Sliding Window Technique - Algorithmic Mental Models канала Ryan Schachte
https://twitter.com/thesimpengineer https://www.linkedin.com/in/schachte/
https://ryan-schachte.com
Don't forget to subscribe! Code:
https://gist.github.com/Schachte/87d7c0165a584f26b3ad7845f8010387
In this video, we'll begin our series of algorithmic mental models and cover the idea behind the sliding window technique. This technique allows us to reduce a typical n^2 algorithm to a linear time algorithm with minimal effort. This exploits linear time optimizations on data structures that deal with iteration and group sequential pieces of data together.
More resources:
https://medium.com/@zengruiwang/sliding-window-technique-360d840d5740
https://thesimpleengineer.com
https://stackoverflow.com/questions/8269916/what-is-sliding-window-algorithm-examples
*Timestamps*
00:00 Welcome
8:25 Maximum sum of contiguous subarray of size 3.
16:35 Question variants
24:50 Dynamic variant. Smallest subarray with given sum.
27:45 Smallest subarray code start
32:48 Smallest subarray solution
33:20 Longest substring with length k distinct characters
Видео Sliding Window Technique - Algorithmic Mental Models канала Ryan Schachte
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
Sliding Window Algorithm - Longest Substring Without Repeating Characters (LeetCode)5 Problem Solving Tips for Cracking Coding Interview QuestionsKadane's Algorithm - Maximum Sum Subarray (Amazon Coding Interview Question)Sliding Window ProtocolMy Regrets as a Computer Science StudentWhy Most People FAIL to Learn ProgrammingHow I Got Good at Coding InterviewsWhat no one tells you about coding interviews (why leetcode doesn't work)Winning Google Kickstart Round A 2020 + FacecamThe 10 Most Important Concepts For Coding Interviews (algorithms and data structures)Sliding Window Maximum | LeetcodeSolve subarray problems FASTER (using Sliding Windows)Software Engineer Salaries... How much do programmers make?Minimum Window Substring: Utilizing Two Pointers & Tracking Character Mappings With A HashtableDynamic Programming - Learn to Solve Algorithmic Problems & Coding ChallengesKadane's Algorithm to Maximum Sum Subarray ProblemSliding Window Technique | Google Coding Interview | Maximum Size SubArray Of Size K🧠Mastering Algorithms: Sliding Window Pattern 🔥Sliding Window Introduction Identification And Types