feat(content): hidden test cases

This commit is contained in:
2025-08-06 23:21:42 +01:00
parent 89b5dd1457
commit 6bed0a6787
134 changed files with 2075 additions and 0 deletions

View File

@@ -10,6 +10,26 @@ patterns:
- heap
- union-find
function_signature: "def min_cost_connect_points(points: list[list[int]]) -> int:"
test_cases:
visible:
- input: { points: [[0, 0], [2, 2], [3, 10], [5, 2], [7, 0]] }
expected: 20
- input: { points: [[3, 12], [-2, 5], [-4, 1]] }
expected: 18
hidden:
- input: { points: [[0, 0]] }
expected: 0
- input: { points: [[0, 0], [1, 1]] }
expected: 2
- input: { points: [[0, 0], [1, 0], [2, 0]] }
expected: 2
- input: { points: [[-1000000, -1000000], [1000000, 1000000]] }
expected: 4000000
- input: { points: [[0, 0], [0, 1], [1, 0], [1, 1]] }
expected: 3
description: |
You are given an array `points` representing integer coordinates of some points on a 2D-plane, where `points[i] = [x_i, y_i]`.