feat(content): function signatures + test cases

This commit is contained in:
2025-07-13 19:53:34 +01:00
parent d65ccf7dc2
commit 0262ca8bf6
203 changed files with 4526 additions and 0 deletions

View File

@@ -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: