Maximum Product Sub-array (LeetCode 152) | Full Solution with animations and proof | Simplified

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


Chapters:
00:00 - Intro
00:45 - Problem Statement and Description
02:43 - Breakdown the problem into parts
07:36 - Proving the idea
11:32 - Dry-run of Code
13:35 - Final Thoughts

📚 Links to topics I talk about in the video:

📖 Reference Books:

🎥 My Recording Gear:

💻 Get Social 💻

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

As of this writing LeetCode added a new test case which cause the above code to fail. The logic is still correct though.

The test case fails because of overflow error. With just a small fix, the code still works. Have a look at the updated code on my Github link :)

nikoo
Автор

This is the simplest and most intutive solution.

sayedmahmudulalam
Автор

you did a great job explaining this concept, really helpful!!

yashbhinwal
Автор

Fantastic explaination👏👏👏You deserve more likes, more views and definitely more subscribers!!!

hoddybhaba
Автор

I was really struggling to understand some other solutions for this problem that used dynamic programming, but you really made it simple to understand! Thanks!

andreabad
Автор

the way you explain things are just Awesome.

vineetkumar
Автор

What an explanation. Really mind-blowing. Saw other videos on the same topic, but this is a really whole different level of logic.

subhadippahari
Автор

Very clean, clear and simple explanation.

faizuddin
Автор

Your explanations are so on point yaar... I've been binge-watching all your videos...!
Please make more.

ghanashrim
Автор

I do really like your solution, it is so much easier to understand. Thank you

stanislavmozolevskiy
Автор

Crisp and clear explanation. Thank you bro.

akhintheruvath
Автор

This is genius. You deserve more likes and more subscribers. I love your systematic way of explaining the reasoning.

MinhLe-ksen
Автор

bhai tum kya bande ho yaar… when other top teachers and youtubers fail to explain the hardest problems, you explain those problems so easily somehow….. Man you deserve so much appreciation… Great work bhai..so much inspired by you… Really top-notch explanations.

yashyadav
Автор

your explanation is awesome. I totally understand it.

samiramousaie
Автор

Great explanation, thanks! I actually solved it in a similar way, but was unsure if it's a way to go since everyone is talking DP nowadays.

jironymojirolamus
Автор

Your explanation is superb. Subscribed.

avinashabhi
Автор

Bro ur explanation is awesome!! I am able to think the flow of program and build the intuition easily.. one request bro Plz upload recursion vdos.. Thank you!!

rajalakshmirajasekar
Автор

Your solution impies that ans subarray lie either in suffix or in prefix in non zero elements are present

shreyanshgoel
Автор

Excellent explanation. I mean, you made question easy.. valaaaah😊

amitmandal
Автор

this is the best simple solution even the editorial solution is nothing infront of this

zljuttg