We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
took me 4 hours to do this, the logic is to find how much range that the number [i] can spread.
spread is spread to max [index left] and to max [index right] starting from [i].
the valid range is when the number is higher than [i] number. i dont know if this acceptable since i dont use stack at all.
Largest Rectangle
You are viewing a single comment's thread. Return to all comments →
took me 4 hours to do this, the logic is to find how much range that the number [i] can spread. spread is spread to max [index left] and to max [index right] starting from [i]. the valid range is when the number is higher than [i] number. i dont know if this acceptable since i dont use stack at all.