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