...

/

Solution: Daily Temperatures

Solution: Daily Temperatures

Let’s solve the Daily Temperatures problem using the Stacks pattern.

Statement

Given an array of integers, temperatures, that represents daily temperatures, return an array, output, where each element, output[i], indicates the number of days you need to wait after the ithi^{th} day to experience a warmer temperature if there is no future day with a higher temperature, set output[i] to 0.

Constraints:

  • ...

Access this course and 1400+ top-rated courses and projects.