feat(content): hidden test cases
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user