You are viewing a single comment's thread. Return to all comments →
you misunderstood his comment; the stack keeps track of subsequences that are increasing. This is a necessary part of the optimal O(N) solution.
Seems like cookies are disabled on this browser, please enable them to open this website
Largest Rectangle
You are viewing a single comment's thread. Return to all comments →
you misunderstood his comment; the stack keeps track of subsequences that are increasing. This is a necessary part of the optimal O(N) solution.