Sliding Window in 7 minutes | LeetCode Pattern

preview_player
Показать описание

In this video, I talk about the sliding window algorithm and explain it using leetcode examples.

Рекомендации по теме
Комментарии
Автор

3:52


//mistaken in for loop

for(int i = k; i < n; i++){
sum += nums[i];
sum -= nums[i-k];
maxSum = Math.max(maxSum, sum);
}

karthick-palanivel
Автор

Mistake in the loop

Should be:

sum += nums[i]
sum -= nums[i - k]

MbuthiMungai
Автор

Error at 3:38, += and -= should be interchanged

AkshatMajila
Автор

1:22 . I found the way which is more understandable for me.. can I know is this something you created or it's available publicly. If it's available for other algorithms where can I find them .. if it's created by you can you also create such statements for other algorithms

ALTHAFKD
Автор

nicely explained Ashish Bhaiya.
Looking for other videos.
Also please make a video on what all thinks should go on inour mind while solving a particular problem.HOW can we utilise your
300 PATTERN PROBLM to the best of our ability.

avinavkashyap
Автор

The contestant from Hangzhou has played the video at double speed.

JiangnanPsalter
Автор

The space complexity for the dynamic sliding window question should be O(s)

leotaozeng
Автор

it should be
sum=sum-nums[i-k]+nums[i];
maxSum=Math.max(sum, maxSum);

shashikumar
Автор

isst a hashmap better for the second problem since you can just put the left pointer to the value of the duplicate +1?

jikhjbjkl
Автор

why didn't you make a video on the hashmap pattern, please make it sir.

MANIREDDYGAJU
Автор

thanks bhai as many pointed, java code for fixed mein mistake hain, dhang se dekh liyo bhai. thoda phati 5 10 mins tak mera :D

rohitmantri
Автор

Video is just explaining the technique. But as a daily DSA coder I won't support it. You has to solve tough questions for each technique

xavier
Автор

Also make videos on que related to maths/ number theory

JDK_
Автор

3:38 mistake in add and remove element in window

sandeepvaishnav
Автор

good explaination and scripts but why are you talking like robot

AaishanAhmad
Автор

Galat kyu pdhate ho bhai ki jo pehli brr sikhe uska concept hi bigd jaaye..

For loop me mistakes kiye ho...

Syntax-scribe-jsx
Автор

i dont understand your explanation of code dont know why as it feels like you are just reading it not teaching it.

GamingId-vq
welcome to shbcf.ru