feat(content): more test cases

This commit is contained in:
2025-07-13 19:25:39 +01:00
parent 98ebb1600f
commit 16b02451d0
94 changed files with 1840 additions and 0 deletions

View File

@@ -10,6 +10,22 @@ categories:
patterns:
- two-pointers
function_signature: "def four_sum(nums: list[int], target: int) -> list[list[int]]:"
test_cases:
visible:
- input: { nums: [1, 0, -1, 0, -2, 2], target: 0 }
expected: [[-2, -1, 1, 2], [-2, 0, 0, 2], [-1, 0, 0, 1]]
- input: { nums: [2, 2, 2, 2, 2], target: 8 }
expected: [[2, 2, 2, 2]]
hidden:
- input: { nums: [0, 0, 0, 0], target: 0 }
expected: [[0, 0, 0, 0]]
- input: { nums: [1, 2, 3, 4], target: 10 }
expected: [[1, 2, 3, 4]]
- input: { nums: [1, 2, 3, 4], target: 100 }
expected: []
description: |
Given an array `nums` of `n` integers, return *an array of all the **unique** quadruplets* `[nums[a], nums[b], nums[c], nums[d]]` such that: