Back to Browse

Maximum Product Subarray - Leetcode152 | JavaScript | DP/Kadane's like approach | Part 2

18 views
Oct 3, 2025
27:24

📌 In this video, we solve Leetcode 152: Maximum Product Subarray using JavaScript. This is a common coding interview problem that challenges your understanding of prefix product and suffix product and dynamic programming and edge-case handling with negative numbers and zeros. 🚀 Topics Covered: - Problem breakdown and constraints - DP approach or Kadanes algorithm like approach - Java and JavaScript implementations - Tips for optimizing performance Problem link: https://leetcode.com/problems/maximum-product-subarray/description/ Maximum product subarray prefix-suffix approach: https://www.youtube.com/watch?v=d-G-pyJteR0 Maximum subarray sum: https://www.youtube.com/watch?v=M7TbXQK3uTw ---- 🧠 Great for FAANG, tech interviews, and DSA prep. 🔥 More DSA videos coming soon! Subscribe to stay updated! 💬 Got questions or suggestions? Drop a comment below! Timestamp: 00:00 Introduction 00:50 Understanding problem 02:45 Second optimal solution (DP approach or Kadanes algorithm like approach) 13:35 Second optimal solution execution in leetcode 16:45 Compare prefix-suffix approach and Kadane's like approach 19:11 Find subarray which gives maximum product-follow up 25:40 Wrap up On this channel, you'll find: ✅ Beginner to Advanced DSA Tutorials (Arrays, Linked Lists, Trees, Graphs, Dynamic Programming & more!) ✅ Coding Interview Preparation (Google, Microsoft, Amazon, FAANG & top tech companies) ✅ LeetCode, CodeChef, HackerRank Solutions with in-depth explanations ✅ System Design & Competitive Programming Tips 🎯 Whether you're a beginner starting your DSA journey or a pro sharpening your problem-solving skills, this channel has something for you!🔔 Subscribe now & start your DSA mastery journey today! 📌 Follow us for updates & extra content: 📱Instagram: https://www.instagram.com/maheshrd999/ 🌐 LinkedIn: https://www.linkedin.com/in/mahesh-dharwad-b4839267/ #Leetcode152 #MaximumProductSubarray #Java #JavaScript #CodingInterview #DynamicProgramming #KadaneAlgorithm #LeetcodeSolutions #prefixproduct #suffixproduct

Download

0 formats

No download links available.

Maximum Product Subarray - Leetcode152 | JavaScript | DP/Kadane's like approach | Part 2 | NatokHD