Sliding Window Maximum | Sliding Window Algorithm | Deque Data Structure | DSA-One Course #54

preview_player
Показать описание
Hey guys, In this video, We're going to solve another very famous Interview Problem called - Sliding Window Maximum

0:00 Problem statement
1:41 Naive Solution
2:31 Naive Solution code
3:26 Using AVL tree/Max Heap
6:51 Using Max heap code
8:23 Using Deque
15:06 Using Deque code

🥳 Join our Telegram Community:

🚀 Follow me on:

💸 Use coupon code ANUJBHAIYA on GeeksforGeeks to avail discounts on courses!

Hashtags:
#anujbhaiya #dsaone

Tags:

sliding window maximum
sliding window algorithm
sliding window
maximum of all subarrays of size k
sliding window problem
sliding window technique algorithm
anuj bhaiya
sliding window technique
sliding window java
239. sliding window maximum
sliding window dsa
sliding window c++
maximum of minimum for every window size
first negative integer in every window of size k
sliding window playlist
deque
sliding window maximum leetcode
sliding windows
sliding window problems
window sliding technique
maximum sliding window
sliding window max
sliding window python
sliding window in java
window sliding
dequeue in data structure
find the maximum of minimums of every window size
leetcode 239
deque data structure
dsa
monotonic queue
sliding window concept
sliding window leetcode
anuj bhaiya dsa
anuj bhaiya java
sliding window approach
sliding window maximum (maximum of all subarrays of size k)
sliding window median
java+dsa
sliding window coding
sliding window javascript
sliding window protocol
smallest distinct window
apna college
dequeue in java
double ended queue
dsa one
maximum erasure value
maximum subarray problem
maximum sum subarray of size k
minimize the maximum difference between the heights
sidemen spend
sliding
sliding window code
sliding window pattern
sliding window questions
Рекомендации по теме
Комментарии
Автор

I have seen many youtuber teachers, but this way of explaination and sense of logic satisfation only coming with ANUJ BHAIYA..
Thanks A

rahul-sinha
Автор

i never go without liking your video. i don't know why people even can't do this for you when they take huge knowledge for free. people should respect the effort.

i also try to let run ads completely whenever i can so that you can get some benefit. this is the least that we can do while watching your videos...

arifsaleem-
Автор

Its very important problem . It is used in another Q as a part. Try to memorize and practice O(n) approach.

madhavdua
Автор

this video is the best example for u are the top 1 programming YT no one is near to u💥💥💥💥

BalavardhanReddyMalyala
Автор

Congratulations bhaiya for 200k family.🥳🎉🎉🎉🎉🎉🎉🎉❣️ waiting for 1 million 🥺

shristiiverma
Автор

Best way of explaining DSA question. your videos are amazing

sakshichauhan
Автор

Bhai ye to interview material hai ... Coding Ninja k paise bacch gaye. Grateful for the work you are putting out there.

MsVaibhav
Автор

Congratulations bhaiya for 200k subscriber. I have one question
Bhaiya agar kisi k paas software engineer ki degree nhi ho aur wo agar skill ke base pr kisi startup ya kisi choti company mein sde-1 ki job kr leta hai to kya iske base pr usey Google Microsoft ya Amazon mein job mil skti hai.
Please reply

bharattalksall
Автор

Congrats Anuj Bhaiya for 200k subscribers 🎊🎊. And Thank you I have recently secured a job with the help of your Java course at Apni kaksha and DSA One Course 🙏❤️❤️

parthap
Автор

Congratulations bhaiya 200k more to go 😁 btw bhut helpful video ❤❤

vinaybadola
Автор

Random deletion of element in priority queue is possible in cpp.
If yes, how ?

ShubhamKumar-pvpj
Автор

I always takes very deep interest in your videos because your explanation is very simple for understanding sir ❤️❤️

preetkatiyar
Автор

You could also solve this using segment trees, for the people who ain't aware of deque ds

azeezmoiz
Автор

Deletion of a random element from the heap takes O(n) time, right?
How can it be O(log n)?

vaibhavdeshmukh
Автор

Cant code the second solution in CPP, there is no function to pop elements with value, we can only pop the min or max element from 2 types of priority queues.
If there is any code of second approach in c++ kindly help.

milenitrivedi
Автор

Deque solution taking O(n*k) because for every element we are checking is there any smaller element then that so it take O(n*k) Anuj Bhaiya Clarify!!!!

chandlerformymonica
Автор

why there is no .remove() function for the priority queue in the c++?

yashmandaviya
Автор

How to think of edge cases in programming? I really suck at this!

tanzeelahmed
Автор

deleting an arbitrary element from the heap takes more than logarithmic time

tanaykamath
Автор

bhaiya add more video's frequently and u told that u add one video per day, try to make

deepjyotidebnath