feat(content): function signatures + test cases
This commit is contained in:
@@ -8,6 +8,30 @@ categories:
|
||||
patterns:
|
||||
- binary-search
|
||||
|
||||
function_signature: "def guess_number(n: int) -> int:"
|
||||
|
||||
test_cases:
|
||||
visible:
|
||||
- input: { n: 10, pick: 6 }
|
||||
expected: 6
|
||||
- input: { n: 1, pick: 1 }
|
||||
expected: 1
|
||||
- input: { n: 2, pick: 1 }
|
||||
expected: 1
|
||||
hidden:
|
||||
- input: { n: 2, pick: 2 }
|
||||
expected: 2
|
||||
- input: { n: 100, pick: 50 }
|
||||
expected: 50
|
||||
- input: { n: 100, pick: 1 }
|
||||
expected: 1
|
||||
- input: { n: 100, pick: 100 }
|
||||
expected: 100
|
||||
- input: { n: 1000000, pick: 999999 }
|
||||
expected: 999999
|
||||
- input: { n: 50, pick: 25 }
|
||||
expected: 25
|
||||
|
||||
description: |
|
||||
We are playing the Guess Game. The game is as follows:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user