Minimum window substring | LeetCode Hard problem | Detailed solution with code | DSA

  Рет қаралды 5,849

Aditya Rajiv

Aditya Rajiv

Күн бұрын

Пікірлер: 15
@JAYAPUSHPAMV
@JAYAPUSHPAMV 8 ай бұрын
keep making video one of the best video for sliding window
@sharad3877
@sharad3877 Жыл бұрын
best explaination on YT for this problem
@anirudhm187
@anirudhm187 2 жыл бұрын
Helpful , best explaination on YT ! 👏👏👏👏
@SaadKhan-sg4wh
@SaadKhan-sg4wh Жыл бұрын
clean and readable code, good work!
@empiregaming3675
@empiregaming3675 Жыл бұрын
explanation at speed of 1.75 is best to understand and save time
@hitendusseja6615
@hitendusseja6615 11 ай бұрын
Hello you have initialised the vector ( the map to store frequencies) by 0, but later on in the video you said the frequency of elements which are not in 't' string would be -1. Is there a correction that I am missing sir?
@world4coding
@world4coding Жыл бұрын
You should have to be cool and think about the approach he is using and do 2-3 dry runs. He is actually explaining best on entire youtube.
@hardcash9930
@hardcash9930 Жыл бұрын
what if string s contains AAA in the starting count will increase each time then after that count will be equal to s ka size it will update minlenth and ans will be zero plz explain request
@cricophobiya4178
@cricophobiya4178 10 ай бұрын
from collections import Counter def minimum_window(str1,str2): window="a"*(len(str1)+1) left=0 count=0 hashmap=Counter(str2) for i in range(len(str1)): if str1[i] in hashmap: hashmap [str1[i]]-=1 if hashmap [str1[i]]>=0: count+=1 while count==len(str2): if len(str1[left:i+1]) < len(window): window=str1[left:i+1] if str1[left] in hashmap: hashmap [str1[left]]+=1 if hashmap [str1[left]]>0: count-=1 left+=1 return window str1='ADOBECODEBANC' str2='ABC' print(minimum_window(str1,str2)) str1 = "PRWSOERIUSFK" str2 = "OSU" print(minimum_window(str1,str2))
@shubhamsukum
@shubhamsukum 2 жыл бұрын
Thanks! It helped me. ^_^
@Om754
@Om754 Жыл бұрын
thx
@surojitmodak1683
@surojitmodak1683 2 жыл бұрын
#bestexplanation
@its_me_hb
@its_me_hb Жыл бұрын
not helpful
@world4coding
@world4coding Жыл бұрын
You should have to be cool and think about the approach he is using and do 2-3 dry runs. He is actually explaining best on entire youtube.
@alhassanecamara2095
@alhassanecamara2095 10 ай бұрын
He also do his best to make the video sort and easy to watch!
Minimum Window Substring | Sliding Window | LeetCode
18:00
AlgosWithMichael
Рет қаралды 40 М.
ЛУЧШИЙ ФОКУС + секрет! #shorts
00:12
Роман Magic
Рет қаралды 38 МЛН
Twin Telepathy Challenge!
00:23
Stokes Twins
Рет қаралды 62 МЛН
КОГДА К БАТЕ ПРИШЕЛ ДРУГ😂#shorts
00:59
BATEK_OFFICIAL
Рет қаралды 8 МЛН
They Chose Kindness Over Abuse in Their Team #shorts
00:20
I migliori trucchetti di Fabiosa
Рет қаралды 12 МЛН
L12. Minimum Window Substring | 2 Pointers and Sliding Window Playlist
27:06
MINIMUM WINDOW SUBSTRING | LEETCODE # 76 | PYTHON SOLUTION
28:08
Cracking FAANG
Рет қаралды 3 М.
How I Failed the Google Coding Interview (and lessons I learned)
14:24
How Senior Programmers ACTUALLY Write Code
13:37
Thriving Technologist
Рет қаралды 1,6 МЛН
How to: Work at Google - Example Coding/Engineering Interview
24:02
Life at Google
Рет қаралды 7 МЛН
Minimum Window Substring | Variable Size Sliding Window
40:35
Aditya Verma
Рет қаралды 202 М.
ЛУЧШИЙ ФОКУС + секрет! #shorts
00:12
Роман Magic
Рет қаралды 38 МЛН