1465. Maximum Area of a Piece of Cake After Horizontal and Vertical Cuts




just find max height (height cut between height cut) after each cut
and find max width (width cut between width cut) after each cut
ans = max height * max width
time: O(nlogn)
space: O(1)
最後這個乘法, 要小心, 後面要一起乘玩, 再轉 int, 不然會壞掉
Last updated
Was this helpful?