feat(content): more test cases

This commit is contained in:
2025-07-13 19:25:39 +01:00
parent 98ebb1600f
commit 16b02451d0
94 changed files with 1840 additions and 0 deletions

View File

@@ -9,6 +9,30 @@ categories:
patterns:
- monotonic-stack
function_signature: "def daily_temperatures(temperatures: list[int]) -> list[int]:"
test_cases:
visible:
- input: { temperatures: [73, 74, 75, 71, 69, 72, 76, 73] }
expected: [1, 1, 4, 2, 1, 1, 0, 0]
- input: { temperatures: [30, 40, 50, 60] }
expected: [1, 1, 1, 0]
- input: { temperatures: [30, 60, 90] }
expected: [1, 1, 0]
hidden:
- input: { temperatures: [50] }
expected: [0]
- input: { temperatures: [90, 80, 70, 60] }
expected: [0, 0, 0, 0]
- input: { temperatures: [60, 70, 80, 90] }
expected: [1, 1, 1, 0]
- input: { temperatures: [55, 55, 55, 55] }
expected: [0, 0, 0, 0]
- input: { temperatures: [40, 35, 32, 37, 50] }
expected: [4, 2, 1, 1, 0]
- input: { temperatures: [89, 62, 70, 58, 47, 47, 46, 76, 100, 70] }
expected: [8, 1, 5, 4, 3, 2, 1, 1, 0, 0]
description: |
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<sup>th</sup> *day to get a warmer temperature*.