feat(content): more test cases

This commit is contained in:
2025-07-13 19:25:39 +01:00
parent d2b74b6863
commit 85fea3a4bb
94 changed files with 1840 additions and 0 deletions

View File

@@ -10,6 +10,26 @@ categories:
patterns:
- two-pointers
function_signature: "def backspace_compare(s: str, t: str) -> bool:"
test_cases:
visible:
- input: { s: "ab#c", t: "ad#c" }
expected: true
- input: { s: "ab##", t: "c#d#" }
expected: true
- input: { s: "a#c", t: "b" }
expected: false
hidden:
- input: { s: "a", t: "a" }
expected: true
- input: { s: "###", t: "" }
expected: true
- input: { s: "a##b", t: "b" }
expected: true
- input: { s: "xywrrmp", t: "xywrrmu#p" }
expected: true
description: |
Given two strings `s` and `t`, return `true` *if they are equal when both are typed into empty text editors*. `'#'` means a backspace character.