feat(content): more test cases
This commit is contained in:
@@ -10,6 +10,20 @@ patterns:
|
||||
- dfs
|
||||
- matrix-traversal
|
||||
|
||||
function_signature: "def pacific_atlantic(heights: list[list[int]]) -> list[list[int]]:"
|
||||
|
||||
test_cases:
|
||||
visible:
|
||||
- input: { heights: [[1, 2, 2, 3, 5], [3, 2, 3, 4, 4], [2, 4, 5, 3, 1], [6, 7, 1, 4, 5], [5, 1, 1, 2, 4]] }
|
||||
expected: [[0, 4], [1, 3], [1, 4], [2, 2], [3, 0], [3, 1], [4, 0]]
|
||||
- input: { heights: [[1]] }
|
||||
expected: [[0, 0]]
|
||||
hidden:
|
||||
- input: { heights: [[1, 1], [1, 1]] }
|
||||
expected: [[0, 0], [0, 1], [1, 0], [1, 1]]
|
||||
- input: { heights: [[1, 2], [4, 3]] }
|
||||
expected: [[0, 1], [1, 0], [1, 1]]
|
||||
|
||||
description: |
|
||||
There is an `m x n` rectangular island that borders both the **Pacific Ocean** and **Atlantic Ocean**. The **Pacific Ocean** touches the island's left and top edges, and the **Atlantic Ocean** touches the island's right and bottom edges.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user