feat(content): hidden test cases

This commit is contained in:
2025-08-06 23:21:42 +01:00
parent 8544efb5bf
commit e0bf8cda01
134 changed files with 2075 additions and 0 deletions

View File

@@ -8,6 +8,26 @@ categories:
patterns:
- greedy
function_signature: "def merge_triplets(triplets: list[list[int]], target: list[int]) -> bool:"
test_cases:
visible:
- input: { triplets: [[2, 5, 3], [1, 8, 4], [1, 7, 5]], target: [2, 7, 5] }
expected: true
- input: { triplets: [[3, 4, 5], [4, 5, 6]], target: [3, 2, 5] }
expected: false
- input: { triplets: [[2, 5, 3], [2, 3, 4], [1, 2, 5], [5, 2, 3]], target: [5, 5, 5] }
expected: true
hidden:
- input: { triplets: [[1, 1, 1]], target: [1, 1, 1] }
expected: true
- input: { triplets: [[1, 2, 3]], target: [1, 2, 4] }
expected: false
- input: { triplets: [[5, 1, 1], [1, 5, 1], [1, 1, 5]], target: [5, 5, 5] }
expected: true
- input: { triplets: [[6, 1, 1], [1, 5, 5]], target: [5, 5, 5] }
expected: false
description: |
A **triplet** is an array of three integers. You are given a 2D integer array `triplets`, where `triplets[i] = [a_i, b_i, c_i]` describes the i<sup>th</sup> **triplet**. You are also given an integer array `target = [x, y, z]` that describes the **triplet** you want to obtain.