Glossary: Coding Interviews in JavaScript
Monotonic stack
A stack kept in increasing (or decreasing) order as items are pushed, used to answer 'next bigger value' questions. It is a common follow-up technique to the basic stack pattern.
Glossary: Coding Interviews in JavaScript
A stack kept in increasing (or decreasing) order as items are pushed, used to answer 'next bigger value' questions. It is a common follow-up technique to the basic stack pattern.