feat(content): function signatures + test cases
This commit is contained in:
@@ -10,6 +10,28 @@ categories:
|
||||
patterns:
|
||||
- two-pointers
|
||||
|
||||
function_signature: "def three_sum_multi(arr: list[int], target: int) -> int:"
|
||||
|
||||
test_cases:
|
||||
visible:
|
||||
- input: { arr: [1, 1, 2, 2, 3, 3, 4, 4, 5, 5], target: 8 }
|
||||
expected: 20
|
||||
- input: { arr: [1, 1, 2, 2, 2, 2], target: 5 }
|
||||
expected: 12
|
||||
- input: { arr: [2, 1, 3], target: 6 }
|
||||
expected: 1
|
||||
hidden:
|
||||
- input: { arr: [0, 0, 0], target: 0 }
|
||||
expected: 1
|
||||
- input: { arr: [0, 0, 0, 0, 0], target: 0 }
|
||||
expected: 10
|
||||
- input: { arr: [1, 2, 3, 4, 5, 6], target: 12 }
|
||||
expected: 4
|
||||
- input: { arr: [3, 3, 3, 3, 3], target: 9 }
|
||||
expected: 10
|
||||
- input: { arr: [1, 1, 1, 1, 1, 1], target: 3 }
|
||||
expected: 20
|
||||
|
||||
description: |
|
||||
Given an integer array `arr`, and an integer `target`, return the number of tuples `i, j, k` such that `i < j < k` and `arr[i] + arr[j] + arr[k] == target`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user