feat(content): function signatures + test cases

This commit is contained in:
2025-07-13 19:53:34 +01:00
parent 9e6c6d256f
commit 65a8d525f5
203 changed files with 4526 additions and 0 deletions

View File

@@ -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.