feat(content): function signatures + test cases
This commit is contained in:
@@ -9,6 +9,28 @@ categories:
|
||||
patterns:
|
||||
- two-pointers
|
||||
|
||||
function_signature: "def check_if_exist(arr: list[int]) -> bool:"
|
||||
|
||||
test_cases:
|
||||
visible:
|
||||
- input: { arr: [10, 2, 5, 3] }
|
||||
expected: true
|
||||
- input: { arr: [3, 1, 7, 11] }
|
||||
expected: false
|
||||
- input: { arr: [7, 1, 14, 11] }
|
||||
expected: true
|
||||
hidden:
|
||||
- input: { arr: [0, 0] }
|
||||
expected: true
|
||||
- input: { arr: [-2, 0, 10, -19, 4, 6, -8] }
|
||||
expected: false
|
||||
- input: { arr: [-10, 12, -20, -8, 15] }
|
||||
expected: true
|
||||
- input: { arr: [1, 2, 3, 4] }
|
||||
expected: true
|
||||
- input: { arr: [1, 3, 5, 7] }
|
||||
expected: false
|
||||
|
||||
description: |
|
||||
Given an array `arr` of integers, check if there exist two indices `i` and `j` such that:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user