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,26 @@ categories:
patterns:
- two-pointers
function_signature: "def array_strings_are_equal(word1: list[str], word2: list[str]) -> bool:"
test_cases:
visible:
- input: { word1: ["ab", "c"], word2: ["a", "bc"] }
expected: true
- input: { word1: ["a", "cb"], word2: ["ab", "c"] }
expected: false
- input: { word1: ["abc", "d", "defg"], word2: ["abcddefg"] }
expected: true
hidden:
- input: { word1: ["a"], word2: ["a"] }
expected: true
- input: { word1: ["a", "b", "c"], word2: ["abc"] }
expected: true
- input: { word1: ["ab"], word2: ["a", "b"] }
expected: true
- input: { word1: ["abc"], word2: ["ab"] }
expected: false
description: |
Given two string arrays `word1` and `word2`, return `true` *if the two arrays **represent** the same string, and* `false` *otherwise*.