feat(content): function signatures + test cases
This commit is contained in:
@@ -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:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user