Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 1594. Maximum Non Negative Product in a Matrix
Find a right/down path from the top-left to bottom-right that maximizes the product of visited cells, returning the maximum non-negative product modulo 1e9+7 (or -1 if all products are negative). Because cells can be negative or zero, this is solved with DP that tracks both the maximum and minimum product at each cell to handle sign flips.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.