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

@@ -8,6 +8,28 @@ categories:
patterns:
- two-pointers
function_signature: "def capitalize_title(title: str) -> str:"
test_cases:
visible:
- input: { title: "capiTalIze tHe titLe" }
expected: "Capitalize The Title"
- input: { title: "First leTTeR of EACH Word" }
expected: "First Letter of Each Word"
- input: { title: "i lOve leetcode" }
expected: "i Love Leetcode"
hidden:
- input: { title: "TO BE OR NOT TO BE" }
expected: "to be or Not to be"
- input: { title: "a" }
expected: "a"
- input: { title: "AB" }
expected: "ab"
- input: { title: "ABC" }
expected: "Abc"
- input: { title: "the QUICK brown FOX" }
expected: "The Quick Brown Fox"
description: |
You are given a string `title` consisting of one or more words separated by a single space, where each word consists of English letters. **Capitalize** the string by changing the capitalization of each word such that: