best explanation I found on youtube Animation helped me a lot to understand it easily Thanks for the vdo
@arnavkadam455215 күн бұрын
best explaination on dynamic sliding window appproach till now I found on youtube
@skillkrio2 жыл бұрын
Hey i wanna give a tight hug to you. 3 days i was trying to learn this concept understood the static window but couldn't get understand how dynamic window. I don't know the term dynamic but conceptually i am trying to increase the windows size until my desired result comes. But dont' know how to implement it . Thank you for taking your time and explaining the entire concept slowly without any rush. Please continue your video either c++ or java. It is widely used in dsa . I had solved 3 problem on my own after your video . You are a life saver Man.
@ffsnewboi9919 Жыл бұрын
Keep the videos coming! Loved it
@primalwarlord Жыл бұрын
Nice explaination.. Loved it
@adeleyejeremiah40592 жыл бұрын
Honestly, you have done a good job to this dynamic sliding window than other videos I have watched in the time past. I have also struggled to understand the concept of dynamic sliding window but I got more confused each time I visit a video on it and now you have made it look like it is a piece of cake. thank you for this gesture. However, You didn't calculate big O notation of the approach you used in 19:18 because I can see while loop within a for loop which is appearing to me as O of N square, I will like clarification on that.
@uncannyresemblance3 ай бұрын
Awesome explanation 👏👏
@sundayndu5 ай бұрын
Nice visualization of sliding window technique, infact one of the best out there. However, I don't think you are meant to reassign the answer [and = min(and, r - l +1) in the while loop. It should be done outside the while loop to also consider answers in situations that matches the condition(sum< S). We got away with it in this case because, the algorithm is asking for the smallest subarray.
@hatefraheeme4020 Жыл бұрын
Great explanation bro.
@chanduiit422 жыл бұрын
Wonderful explanation...can you explain the correctness of this approach..as in how does this dynamic sliding window ensure that all the subarrays are seen and calculated? Thanks in advance.
@CursiveThoughtsАй бұрын
3:14 isn't the sum of those three equal to 12?
@jamjam34486 ай бұрын
thanks very much
@waqasshoukat77922 жыл бұрын
Good Attempt
@qwertyqwerty-si8nn2 жыл бұрын
Kindly verify my solution in python: import math arr = [5,2,8,10,5,7,2,9] S = 15 lst = [] length = math.inf end = 0 for i in range(len(arr)): if sum(lst) >=S: length = min(length, len(lst)) lst.pop(0) else: lst.append(arr[end]) end+=1 print(length)