Hello,
I am getting a TLE for this problem while using an O(n) solution. It computes the maximum rectangle area as it reads the heights. żIs there anything better? Perhaps reading the data and later aplying an O(log n) algorithm, like binary search or some wacky O(1) would do it, but I can't figure them out.
Thank you,
created
last reply
- 11
replies
- 775
views
- 7
users