# Daily Temperatures

> LeetCode #739 — Daily Temperatures. Solve on LeetCode, then implement here if you want it in your drill queue.

https://leetcode.com/problems/daily-temperatures/

Canonical: https://learn.significanthobbies.com/curriculum/drills/lc-daily-temperatures

LeetCode #739 — Daily Temperatures. Solve on LeetCode, then implement here if you want it in your drill queue.

https://leetcode.com/problems/daily-temperatures/

## The mechanism

A stack is last-in-first-out: the last thing you pushed is the first thing you pop. Reach for one when the natural question is "what was the most recent unfinished thing?" — parsing, recursion, undo, matching brackets.

## Expected evidence

Pass all LeetCode test cases for this problem.

## Hints

- Pattern hint: stack.
- Start with brute force, then optimize time/space.
- Write down invariants before coding.

## Sources and practice

- [Stack (Wikipedia)](https://en.wikipedia.org/wiki/Stack_(abstract_data_type))
- [Study Stack](https://learn.significanthobbies.com/curriculum/concepts/stack)
- [Try the interactive drill](https://learn.significanthobbies.com/drills/lc-daily-temperatures)
- [All practice briefs](https://learn.significanthobbies.com/curriculum/drills/)
