feat(content): function signatures + test cases

This commit is contained in:
2025-07-13 19:53:34 +01:00
parent 9e6c6d256f
commit 65a8d525f5
203 changed files with 4526 additions and 0 deletions

View File

@@ -11,6 +11,28 @@ patterns:
- greedy
- two-pointers
function_signature: "def find_content_children(g: list[int], s: list[int]) -> int:"
test_cases:
visible:
- input: { g: [1, 2, 3], s: [1, 1] }
expected: 1
- input: { g: [1, 2], s: [1, 2, 3] }
expected: 2
hidden:
- input: { g: [1, 2, 3], s: [] }
expected: 0
- input: { g: [10, 9, 8, 7], s: [5, 6, 7, 8] }
expected: 2
- input: { g: [1, 1, 1, 1], s: [1, 1, 1, 1] }
expected: 4
- input: { g: [1], s: [1] }
expected: 1
- input: { g: [5], s: [4] }
expected: 0
- input: { g: [2, 3, 4], s: [1, 2, 3, 4, 5] }
expected: 3
description: |
Assume you are an awesome parent and want to give your children some cookies. But, you should give each child at most one cookie.