feat(content): function signatures + test cases
This commit is contained in:
@@ -8,6 +8,26 @@ categories:
|
||||
patterns:
|
||||
- two-pointers
|
||||
|
||||
function_signature: "def are_numbers_ascending(s: str) -> bool:"
|
||||
|
||||
test_cases:
|
||||
visible:
|
||||
- input: { s: "1 box has 3 blue 4 red 6 green and 12 yellow marbles" }
|
||||
expected: true
|
||||
- input: { s: "hello world 5 x 5" }
|
||||
expected: false
|
||||
- input: { s: "sunset is at 7 51 pm overnight lows will be in the low 50 and 60 s" }
|
||||
expected: false
|
||||
hidden:
|
||||
- input: { s: "a 1 b 2 c 3" }
|
||||
expected: true
|
||||
- input: { s: "1 2 3 4 5" }
|
||||
expected: true
|
||||
- input: { s: "5 4 3 2 1" }
|
||||
expected: false
|
||||
- input: { s: "a 10 b 20" }
|
||||
expected: true
|
||||
|
||||
description: |
|
||||
A sentence is a list of **tokens** separated by a **single** space with no leading or trailing spaces. Every token is either a **positive number** consisting of digits `0-9` with no leading zeros, or a **word** consisting of lowercase English letters.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user