Free written solutionMaximum Area of a Piece of Cake After Horizontal and Vertical Cuts (LeetCode 1465): Solution and Explanation
A cake of height h and width w is cut at every position in horizontalCuts and verticalCuts. Return the area of the largest piece, modulo 10^9 + 7.
Read the intuition, approach, code and complexity →