Leetcode Weekly contest 361 - Medium - Count of Interesting Subarrays

preview_player
Показать описание
In this video we discuss the third problem of Leetcode Weekly contest 361

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

I checked your leetcode profile, its simply awesome. after working for 8+ yrs in industry, your are having 364 leetcode streak and u have badge for all month daily challenge. very hardworking sir you are. I will take this as lesson from you and will try put more efforts.

sarankumaar
Автор

Happy Teachers day sir
Thank you for all your hard work

loudcapricorn
Автор

bhaiya yeh kisi standard problem ka variant hai toh woh standard problem bhii bata dijiyee

devbhattdev
Автор

Sir can you please explain the intuition behind targetRem = (prefixRem-k+m)%m . Also in what all the other situations where this formula helps ?. I have bee struggling for 2 days with this problem. Can you please explain sir ?🙏🙏🙏

VK-gldl
Автор

Awesome Explanation!!! I can only think of the brute solution. How to generate the ideas like these sir ?

VK-gldl
Автор

You could have taken some examples instead. Didn't understand the edgecase

lingasodanapalli
Автор

Bro u always explain with great clarity thanks bro for all this effort

KrishnaVenkatesan
Автор

You have such an elegant solution but I am still struggling. Why does (remainder - k) need the % modulo? I see that it doesn't work without it, but I can't seem to figure out why.

ultimatesonic
Автор

I think, instead of S-X = Y it should X-S=Y => X-Y = S
according to the example excluding prefix perfix sum upto Y, the remaining sum is S i:e from index j to i.

mayankjohari
Автор

man quite complex explanation make it bit simpler using the example only then teach through code

aman
Автор

Brother is it mandatory to do cp or we can crack companies like faang by solving Leetcode problem

UltraArbUpdate
visit shbcf.ru