feat(content): more test cases
This commit is contained in:
@@ -11,6 +11,30 @@ patterns:
|
||||
- greedy
|
||||
- two-pointers
|
||||
|
||||
function_signature: "def partition_labels(s: str) -> list[int]:"
|
||||
|
||||
test_cases:
|
||||
visible:
|
||||
- input: { s: "ababcbacadefegdehijhklij" }
|
||||
expected: [9, 7, 8]
|
||||
- input: { s: "eccbbbbdec" }
|
||||
expected: [10]
|
||||
- input: { s: "abc" }
|
||||
expected: [1, 1, 1]
|
||||
hidden:
|
||||
- input: { s: "a" }
|
||||
expected: [1]
|
||||
- input: { s: "aaa" }
|
||||
expected: [3]
|
||||
- input: { s: "abab" }
|
||||
expected: [4]
|
||||
- input: { s: "caedbdedda" }
|
||||
expected: [1, 9]
|
||||
- input: { s: "qiejxqfnqceocmy" }
|
||||
expected: [13, 1, 1]
|
||||
- input: { s: "vhaagbqkaq" }
|
||||
expected: [1, 8, 1]
|
||||
|
||||
description: |
|
||||
You are given a string `s`. We want to partition the string into as many parts as possible so that each letter appears in **at most one part**.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user