Practice Rising Temperature
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Problem Statement
Tables: Weather(id INT, recordDate DATE, temperature INT). Weather.id is unique, and each recordDate occurs at most once. Return the id of each row whose temperature exceeds the temperature on the preceding calendar date. A missing preceding date does not qualify; merely comparing adjacent stored rows is insufficient. Output order is unrestricted.
Source: Rising Temperature on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
Weather table: +----+------------+-------------+ | id | recordDate | temperature | +----+------------+-------------+ | 1 | 2015-01-01 | 10 | | 2 | 2015-01-02 | 25 | | 3 | 2015-01-03 | 20 | | 4 | 2015-01-04 | 30 | +----+------------+-------------+
+----+ | id | +----+ | 2 | | 4 | +----+
Related LeetCode Problems
Practice more problems similar to Rising Temperature.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.