feat(content): function signatures + test cases
This commit is contained in:
@@ -9,6 +9,30 @@ categories:
|
||||
patterns:
|
||||
- two-pointers
|
||||
|
||||
function_signature: "def get_hint(secret: str, guess: str) -> str:"
|
||||
|
||||
test_cases:
|
||||
visible:
|
||||
- input: { secret: "1807", guess: "7810" }
|
||||
expected: "1A3B"
|
||||
- input: { secret: "1123", guess: "0111" }
|
||||
expected: "1A1B"
|
||||
hidden:
|
||||
- input: { secret: "1", guess: "0" }
|
||||
expected: "0A0B"
|
||||
- input: { secret: "1", guess: "1" }
|
||||
expected: "1A0B"
|
||||
- input: { secret: "1111", guess: "1111" }
|
||||
expected: "4A0B"
|
||||
- input: { secret: "1234", guess: "4321" }
|
||||
expected: "0A4B"
|
||||
- input: { secret: "1122", guess: "2211" }
|
||||
expected: "0A4B"
|
||||
- input: { secret: "0000", guess: "1111" }
|
||||
expected: "0A0B"
|
||||
- input: { secret: "1234", guess: "0000" }
|
||||
expected: "0A0B"
|
||||
|
||||
description: |
|
||||
You are playing the **Bulls and Cows** game with your friend.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user