feat(content): more test cases

This commit is contained in:
2025-07-13 19:25:39 +01:00
parent e28da5def2
commit 0f264ef603
94 changed files with 1840 additions and 0 deletions

View File

@@ -10,6 +10,24 @@ patterns:
- two-pointers
- greedy
function_signature: "def max_area(height: list[int]) -> int:"
test_cases:
visible:
- input: { height: [1, 8, 6, 2, 5, 4, 8, 3, 7] }
expected: 49
- input: { height: [1, 1] }
expected: 1
hidden:
- input: { height: [4, 3, 2, 1, 4] }
expected: 16
- input: { height: [1, 2, 1] }
expected: 2
- input: { height: [2, 3, 10, 5, 7, 8, 9] }
expected: 36
- input: { height: [1, 2, 4, 3] }
expected: 4
description: |
You are given an integer array `height` of length `n`. There are `n` vertical lines drawn such that the two endpoints of the i<sup>th</sup> line are `(i, 0)` and `(i, height[i])`.