feat(content): hidden test cases

This commit is contained in:
2025-08-06 23:21:42 +01:00
parent 8544efb5bf
commit e0bf8cda01
134 changed files with 2075 additions and 0 deletions

View File

@@ -8,6 +8,32 @@ categories:
patterns:
- monotonic-stack
function_signature: "class StockSpanner"
test_cases:
visible:
- input:
operations: ["StockSpanner", "next", "next", "next", "next", "next", "next", "next"]
args: [[], [100], [80], [60], [70], [60], [75], [85]]
expected: [null, 1, 1, 1, 2, 1, 4, 6]
hidden:
- input:
operations: ["StockSpanner", "next", "next", "next"]
args: [[], [100], [100], [100]]
expected: [null, 1, 2, 3]
- input:
operations: ["StockSpanner", "next", "next", "next", "next"]
args: [[], [31], [41], [48], [59]]
expected: [null, 1, 2, 3, 4]
- input:
operations: ["StockSpanner", "next", "next", "next", "next"]
args: [[], [100], [90], [80], [70]]
expected: [null, 1, 1, 1, 1]
- input:
operations: ["StockSpanner", "next", "next", "next", "next", "next"]
args: [[], [28], [14], [28], [35], [46]]
expected: [null, 1, 1, 3, 4, 5]
description: |
Design an algorithm that collects daily price quotes for some stock and returns **the span** of that stock's price for the current day.