Sliding Window Algorithm - Variable Length + Fixed Length - DSA Course in Python Lecture 13

  Рет қаралды 17,733

Greg Hogg

Greg Hogg

Күн бұрын

Пікірлер: 22
@GregHogg
@GregHogg 5 ай бұрын
Master Data Structures & Algorithms For FREE at AlgoMap.io!
@mdbillah9998
@mdbillah9998 20 күн бұрын
Your teaching is so unique and easy way get to the student head!
@Shiva-wp2nq
@Shiva-wp2nq 5 ай бұрын
Hey Greg, you're content and way of explaining make me feel like DSA is easy
@GregHogg
@GregHogg 5 ай бұрын
Glad to hear it!
@soumikdas2946
@soumikdas2946 5 ай бұрын
Greg just keep making these videos man you are just awesome ❤
@GregHogg
@GregHogg 5 ай бұрын
Glad to hear it!
@mystikyogi
@mystikyogi 3 ай бұрын
Amazing explanation. Thanks!
@naveentarakaturi9930
@naveentarakaturi9930 5 ай бұрын
you are so talented.
@kdiffin
@kdiffin Ай бұрын
Thanks ❤
@mrsengeel
@mrsengeel 4 ай бұрын
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
@bigk9000
@bigk9000 3 ай бұрын
What is the name of the tool you use to draw stuff out?
@carsworld3433
@carsworld3433 5 ай бұрын
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
@sinanakcali8008
@sinanakcali8008 Ай бұрын
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)
@creativeusername4400
@creativeusername4400 5 ай бұрын
it feels illegal to watch because of its simplicity with DSA
@dennohnjogu4028
@dennohnjogu4028 5 күн бұрын
is it really o(n)? we have two nested loops. Doesnt that makes it o(n squared)?
@dennohnjogu4028
@dennohnjogu4028 5 күн бұрын
in its worst case scenario that is.
@Stanfox-in2rb
@Stanfox-in2rb 2 күн бұрын
It's O(n) because we loop all our array only 1 time
@pjpodx
@pjpodx 5 ай бұрын
what about different sliding windows types/patterns: fixed length, caterpillar, shrinking /expending rules ?
@GregHogg
@GregHogg 5 ай бұрын
Did you watch the video?
@pjpodx
@pjpodx 5 ай бұрын
​@@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.
@GregHogg
@GregHogg 5 ай бұрын
@@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?
@Fam-m4i
@Fam-m4i 5 ай бұрын
First😊
Recursive Backtracking - DSA Course in Python Lecture 14
12:58
Their Boat Engine Fell Off
0:13
Newsflare
Рет қаралды 15 МЛН
УНО Реверс в Амонг Ас : игра на выбывание
0:19
Фани Хани
Рет қаралды 1,3 МЛН
Sliding Window Technique - Algorithmic Mental Models
36:45
Ryan Schachte
Рет қаралды 367 М.
Number of Islands - Leetcode 200 - Graphs (Python)
11:01
Greg Hogg
Рет қаралды 12 М.
Sliding Window Technique + 4 Questions - Algorithms
27:25
QuanticDev
Рет қаралды 127 М.
LeetCode was HARD until I Learned these 15 Patterns
13:00
Ashish Pratap Singh
Рет қаралды 665 М.
sliding window algorithm in python with example
17:54
Liam Isaacs
Рет қаралды 11 М.
Learn Python OOP in under 20 Minutes
18:32
Indently
Рет қаралды 151 М.
I Scraped the Entire Steam Catalog, Here’s the Data
11:29
Newbie Indie Game Dev
Рет қаралды 599 М.
Their Boat Engine Fell Off
0:13
Newsflare
Рет қаралды 15 МЛН