A monotonic stack maintains elements in either strictly increasing or decreasing order. It excels at finding the next greater/smaller element, computing spans, and solving problems involving visibility or dominance relationships in sequences.
When we encounter an element that breaks the monotonic property, all elements popped from the stack have found their "answer" in the current element.
Each element pushed/popped once
Stack can hold all elements in worst case