feat(content): more test cases
This commit is contained in:
@@ -11,6 +11,28 @@ patterns:
|
||||
- backtracking
|
||||
- dynamic-programming
|
||||
|
||||
function_signature: "def partition(s: str) -> list[list[str]]:"
|
||||
|
||||
test_cases:
|
||||
visible:
|
||||
- input: { s: "aab" }
|
||||
expected: [["a", "a", "b"], ["aa", "b"]]
|
||||
- input: { s: "a" }
|
||||
expected: [["a"]]
|
||||
hidden:
|
||||
- input: { s: "aa" }
|
||||
expected: [["a", "a"], ["aa"]]
|
||||
- input: { s: "abc" }
|
||||
expected: [["a", "b", "c"]]
|
||||
- input: { s: "aba" }
|
||||
expected: [["a", "b", "a"], ["aba"]]
|
||||
- input: { s: "aabb" }
|
||||
expected: [["a", "a", "b", "b"], ["a", "a", "bb"], ["aa", "b", "b"], ["aa", "bb"]]
|
||||
- input: { s: "abba" }
|
||||
expected: [["a", "b", "b", "a"], ["a", "bb", "a"], ["abba"]]
|
||||
- input: { s: "racecar" }
|
||||
expected: [["r", "a", "c", "e", "c", "a", "r"], ["r", "a", "cec", "a", "r"], ["r", "aceca", "r"], ["racecar"]]
|
||||
|
||||
description: |
|
||||
Given a string `s`, partition `s` such that every substring of the partition is a **palindrome**.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user