Given an array of integers `temperatures` represents the daily temperatures, return an array `answer` such that `answer[i]` is the number of days you have to wait after the `i-th` day to get a warmer temperature. If there is no future day for which this is possible, keep `answer[i] == 0` instead.
Monotonic Decreasing Stack
A monotonic stack is perfect for finding the 'next greater element'. We store indices of temperatures we haven't found a 'warmer day' for yet. The stack will always be in descending order of temperatures. When we see a temperature warmer than the one at the top of our stack, we know we've found the 'warmer day' for that index. We pop it, calculate the difference in indices, and store it in our result.