feat(content): function signatures + test cases

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

View File

@@ -9,6 +9,24 @@ categories:
patterns:
- two-pointers
function_signature: "def is_prefix_string(s: str, words: list[str]) -> bool:"
test_cases:
visible:
- input: { s: "iloveleetcode", words: ["i", "love", "leetcode", "apples"] }
expected: true
- input: { s: "iloveleetcode", words: ["apples", "i", "love", "leetcode"] }
expected: false
hidden:
- input: { s: "a", words: ["a", "b"] }
expected: true
- input: { s: "abc", words: ["abc"] }
expected: true
- input: { s: "ab", words: ["a", "bc"] }
expected: false
- input: { s: "abc", words: ["ab", "c", "d"] }
expected: true
description: |
Given a string `s` and an array of strings `words`, determine whether `s` is a **prefix string** of `words`.