← ALL NOTES
Array

1594. Maximum Non Negative Product in a Matrix

Moving only right and down from top-left to bottom-right, multiply the values along a path; return the maximum non-negative product mod 1e9+7, or −1 if the best is negative. Negatives flip signs, so…

Loading…