1465. Maximum Area of a Piece of Cake After Horizontal and Vertical Cuts
Previous1464. Maximum Product of Two Elements in an ArrayNext1466. Reorder Routes to Make All Paths Lead to the City Zero
Last updated
Last updated
**Input:** h = 5, w = 4, horizontalCuts = [1,2,4], verticalCuts = [1,3]
**Output:** 4
**Explanation:** The figure above represents the given rectangular cake. Red lines are the horizontal and vertical cuts. After you cut the cake, the green piece of cake has the maximum area.**Input:** h = 5, w = 4, horizontalCuts = [3,1], verticalCuts = [1]
**Output:** 6
**Explanation:** The figure above represents the given rectangular cake. Red lines are the horizontal and vertical cuts. After you cut the cake, the green and yellow pieces of cake have the maximum area.**Input:** h = 5, w = 4, horizontalCuts = [3], verticalCuts = [3]
**Output:** 9