feat(content): more test cases
This commit is contained in:
@@ -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])`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user