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

@@ -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**.