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

problem link:
leetcode.com/problems/minimum...
solution:
ideone.com/KEt3s5
__________________________________________________________________________
All my playlists:
DSA sheet:
• 450 questions DSA sheet
Interview experiences:
• Internship tests/Inter...
Leetcode problems:
• leetcode problems
projects for resume:
• Projects for Resume
Connect with me on LinkeIn:
/ aditya-rajiv-0606491a5
Connect with me on Instagram:
/ adi_rajiv
#leetcode #strings #slidingwinodw #dsa #softwareengineer #SDE #Placement #competitiveprogramming #faang #recursion

Пікірлер: 15

  • @JAYAPUSHPAMV
    @JAYAPUSHPAMV4 ай бұрын

    keep making video one of the best video for sliding window

  • @sharad3877
    @sharad3877 Жыл бұрын

    best explaination on YT for this problem

  • @anirudhm187
    @anirudhm187 Жыл бұрын

    Helpful , best explaination on YT ! 👏👏👏👏

  • @empiregaming3675
    @empiregaming3675 Жыл бұрын

    explanation at speed of 1.75 is best to understand and save time

  • @SaadKhan-sg4wh
    @SaadKhan-sg4wh9 ай бұрын

    clean and readable code, good work!

  • @shubhamsukum
    @shubhamsukum Жыл бұрын

    Thanks! It helped me. ^_^

  • @hitendusseja6615
    @hitendusseja66157 ай бұрын

    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?

  • @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

  • @Om754
    @Om75411 ай бұрын

    thx

  • @world4coding
    @world4coding10 ай бұрын

    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.

  • @surojitmodak1683
    @surojitmodak1683 Жыл бұрын

    #bestexplanation

  • @cricophobiya4178
    @cricophobiya41786 ай бұрын

    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]) 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))

  • @its_me_hb
    @its_me_hb11 ай бұрын

    not helpful

  • @world4coding

    @world4coding

    10 ай бұрын

    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

    6 ай бұрын

    He also do his best to make the video sort and easy to watch!

Келесі