Maximum Non Negative Product in a Matrix | Recursion | Memo | Bottom Up | Leetcode 1594 |DP On Grids

Subscribers:
92,300
Published on ● Video Link: https://www.youtube.com/watch?v=l2_da8_l1jw



Duration: 0:00
1,333 views
72


iPad PDF NOTES - https://github.com/MAZHARMIK/Interview_DS_Algo/blob/master/iPad PDF Notes/Leetcode-1594-Maximum Non Negative Product in a Matrix.pdf
Whatsapp Community Link : https://www.whatsapp.com/channel/0029Va6kVSjICVfiVdsHgi1A

Minimum Path Sum Video -    • Minimum Path Sum | Recursion | Bottom...  

This is the 33rd Video of our Playlist "DP Concepts & Qns" by codestorywithMIK

We already covered the introduction of DP On Grids in video-29 and video-30 of this playlist.
Video-29 - Part-1 -    • Introduction | DP On Grids | Part 1 |...  
Video-30 - Part-2 -    • Introduction | DP On Grids | Part 2 |...  

Today we will be solving a very good problem based on Grid DP - Maximum Non Negative Product in a Matrix | Recursion | Memo | Bottom Up | Leetcode 1594 | DP On Grids | codestorywithMIK
We will solve it using Recursion and Memoization and then we will convert that to Bottom Up.
I will explain the reason behind everything which needs to be known for clearly understanding the solution. It might be a lengthy video,
but for beginners I have added minute details which made it lengthy.


I will explain the intuition so easily that you will never forget and start seeing this as cakewalk EASYYY.
We will do live coding after explanation and see if we are able to pass all the test cases.
Also, please note that my Github solution link below contains both C++ as well as JAVA code.

Problem Name : Maximum Non Negative Product in a Matrix | Recursion | Memo | Bottom Up | Leetcode 1594 | DP On Grids | codestorywithMIK
Company Tags : will update later
My solutions on Github(C++ & JAVA) : https://github.com/MAZHARMIK/Interview_DS_Algo/blob/master/DP/DP on Grids/Maximum Non Negative Product in a Matrix.cpp
Leetcode Link : https://leetcode.com/problems/maximum-non-negative-product-in-a-matrix/description/


My DP Concepts Playlist :    • Roadmap for DP | How to Start DP ? | ...  
My Graph Concepts Playlist :    • Graph Concepts & Qns - 1 : Graph will...  
My Segment Tree Concepts Playlist :    • Segment Tree | Introduction | Basics ...  
My Recursion Concepts Playlist :    • Introduction | Recursion Concepts And...  
My GitHub Repo for interview preparation : https://github.com/MAZHARMIK/Interview_DS_Algo
Instagram : https://www.instagram.com/codestorywithmik/
Facebook : https://www.facebook.com/people/codestorywithmik/100090524295846/
Twitter : https://twitter.com/CSwithMIK
Subscribe to my channel :    / @codestorywithmik  

╔═╦╗╔╦╗╔═╦═╦╦╦╦╗╔═╗
║╚╣║║║╚╣╚╣╔╣╔╣║╚╣═╣
╠╗║╚╝║║╠╗║╚╣║║║║║═╣
╚═╩══╩═╩═╩═╩╝╚╩═╩═╝


Video Summary :
Approach 1: Recursion + Memoization
This approach uses recursion to explore all paths from the top-left to the bottom-right cell while memoizing the results for each cell to avoid redundant calculations. It calculates the maximum and minimum products by considering the paths from below and to the right.

Approach 2: Bottom-Up Dynamic Programming
This approach iteratively fills a DP table starting from the top-left cell, computing the maximum and minimum products by considering the cells above and to the left. It avoids recursion and directly computes the result in a more efficient, iterative manner.


✨ Timelines✨
00:00 - Introduction
0:10 - Motivation
1:26 - Solve Minimum Path Sum
2:11 - Problem Explanation
4:42 - Thought Process + Tree Diagram
9:47 - What we could do wrong
22:20 - Recursion & Memoization
32:35 - Coding Recursion & Memoization
45:09 - Understanding Bottom Up
59:32 - Coding bottom up

#MIK #mik #Mik
#coding #helpajobseeker #leetcode #leetcodequestionandanswers #leetcodesolution #leetcodedailychallenge #leetcodequestions #leetcodechallenge #hindi #india #coding #helpajobseeker #easyrecipes #leetcode #leetcodequestionandanswers #leetcodesolution #leetcodedailychallenge #leetcodequestions #leetcodechallenge #hindi #india #hindiexplanation #hindiexplained #easyexplaination #interview#interviewtips #interviewpreparation #interview_ds_algo #hinglish #github #design #data #google #video #instagram #facebook #leetcode #computerscience #leetcodesolutions #leetcodequestionandanswers #code #learning #dsalgo #dsa #coding #programming #developers #techjobs #datastructures #algorithms #webdevelopment #computerscience #codinglife #coderlife #leetcode #leetcodesolutions #leetcodedailychallenge #codinginterview #interviewprep #interviewquestions #codingchallenges #interviewready #dsa #india #hindicoding #hindiprogramming #hindiexplanation #hindidevelopers #hinditech #hindilearning #helpajobseeker #jobsearchtips #careergoals #careerdevelopment #jobhunt #jobinterview #github #designthinking #learningtogether #growthmindset #digitalcontent #techcontent #socialmediagrowth #contentcreation #instagramreels #codestorywithmik #codestorywithmick #codestorywithmikc #codestorywitmik #codestorywthmik #codstorywithmik #codestorywihmik #codestorywithmiik #codeistorywithmik #codestorywithmk #codestorywitmick #codestorymik #codestorwithmik




Other Videos By codestorywithMIK


2025-01-10Construct K Palindrome Strings | Super Detailed Intuition | Leetcode 1400 | codestorywithMIK
2025-01-09Word Subsets | Simple Thought Process | C++ | Java | Leetcode 916 | codestorywithMIK
2025-01-08Counting Words With a Given Prefix | Brute Force | Trie | Leetcode 2185 | codestorywithMIK
2025-01-07Count Prefix and Suffix Pairs I | Brute Force | Trie | Leetcode 3042 | codestorywithMIK
2025-01-06String Matching in an Array | Simple Approaches | Leetcode 1408 | codestorywithMIK
2025-01-05Minimum Number of Operations to Move All Balls to Each Box | Leetcode 1769 | 3 Approaches | MIK
2025-01-05Shifting Letters II | Leetcode 2381 | Difference Array Technique: Concepts & Questions - 2 | MIK
2025-01-04Introduction | What | How | Difference Array Technique: Concepts & Questions - 1 | codestorywithMIK
2025-01-02But bhai….
2025-01-02Number of Ways to Split Array | Simple Thought Process | Leetcode 2270 | codestorywithMIK
2025-01-02Maximum Non Negative Product in a Matrix | Recursion | Memo | Bottom Up | Leetcode 1594 |DP On Grids
2025-01-01Count Vowel Strings in Ranges | Simple Thought Process | Leetcode 2559 | codestorywithMIK
2024-12-312025 Placement Roadmap | How I Would Have Prepared | Year 2025 Special | Happy New Year
2024-12-31What is special about year 2025 ?
2024-12-27Maximum Sum of 3 Non-Overlapping Subarrays | Detailed For Beginners | Leetcode 689 | codstorywithMIK
2024-12-26Best Sightseeing Pair | 3 Approaches | Detailed For Beginners | Leetcode 1014 | codestorywithMIK
2024-12-26Unique Paths II | Recursion | Memo | Bottom Up | Leetcode 63 | DP On Grids | codestorywithMIK
2024-12-25Target Sum | Two Ways Of Memoization | Detailed | Leetcode 494 | Explanation + Code
2024-12-24Find Building Where Alice and Bob Can Meet | Segment Tree Concepts & Qns | Video 11 | Leetcode 2940
2024-12-24Range Maximum Index Query | Part 2 | Segment Tree Concepts & Qns | Video 10 | codestorywithMIK
2024-12-24Find Minimum Diameter After Merging Two Trees | Leetcode 3203 | Graph Concepts & Qns - 45 | MIK