feat(content): function signatures + test cases
This commit is contained in:
@@ -9,6 +9,28 @@ categories:
|
||||
patterns:
|
||||
- two-pointers
|
||||
|
||||
function_signature: "def valid_palindrome(s: str) -> bool:"
|
||||
|
||||
test_cases:
|
||||
visible:
|
||||
- input: { s: "aba" }
|
||||
expected: true
|
||||
- input: { s: "abca" }
|
||||
expected: true
|
||||
- input: { s: "abc" }
|
||||
expected: false
|
||||
hidden:
|
||||
- input: { s: "a" }
|
||||
expected: true
|
||||
- input: { s: "aa" }
|
||||
expected: true
|
||||
- input: { s: "ab" }
|
||||
expected: true
|
||||
- input: { s: "racecar" }
|
||||
expected: true
|
||||
- input: { s: "racecars" }
|
||||
expected: true
|
||||
|
||||
description: |
|
||||
Given a string `s`, return `true` *if the* `s` *can be a palindrome after deleting **at most one** character from it*.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user