feat(content): function signatures + test cases

This commit is contained in:
2025-07-13 19:53:34 +01:00
parent d65ccf7dc2
commit 0262ca8bf6
203 changed files with 4526 additions and 0 deletions

View File

@@ -9,6 +9,30 @@ categories:
patterns:
- greedy
function_signature: "def gcd_of_strings(str1: str, str2: str) -> str:"
test_cases:
visible:
- input: { str1: "ABCABC", str2: "ABC" }
expected: "ABC"
- input: { str1: "ABABAB", str2: "ABAB" }
expected: "AB"
- input: { str1: "LEET", str2: "CODE" }
expected: ""
hidden:
- input: { str1: "A", str2: "A" }
expected: "A"
- input: { str1: "AAAAAA", str2: "AAA" }
expected: "AAA"
- input: { str1: "ABAB", str2: "AB" }
expected: "AB"
- input: { str1: "AB", str2: "BA" }
expected: ""
- input: { str1: "TAUXXTAUXXTAUXXTAUXXTAUXX", str2: "TAUXXTAUXXTAUXXTAUXXTAUXXTAUXX" }
expected: "TAUXX"
- input: { str1: "ABCDEF", str2: "ABC" }
expected: ""
description: |
For two strings `s` and `t`, we say "`t` divides `s`" if and only if `s = t + t + t + ... + t` (i.e., `t` is concatenated with itself one or more times).