What did you learn? Monotonic stacks find "next greater" (or "next smaller") relationships in .
When you pop from a monotonic stack, you've found a relationship. The current element is the answer for the popped element.
Elements remaining on the stack have no answer. They're bigger than everything to their right. This pattern appears in many forms. You'll see another variation.