feat(content): hidden test cases

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

View File

@@ -9,6 +9,28 @@ categories:
patterns:
- binary-search
function_signature: "class BookMyShow"
test_cases:
visible:
- input:
operations: ["BookMyShow", "gather", "gather", "scatter", "scatter"]
args: [[2, 5], [4, 0], [2, 0], [5, 1], [5, 1]]
expected: [null, [0, 0], [], true, false]
hidden:
- input:
operations: ["BookMyShow", "gather", "scatter"]
args: [[1, 5], [5, 0], [1, 0]]
expected: [null, [0, 0], false]
- input:
operations: ["BookMyShow", "scatter", "scatter", "gather"]
args: [[2, 3], [3, 1], [3, 1], [2, 1]]
expected: [null, true, true, []]
- input:
operations: ["BookMyShow", "gather", "gather", "gather"]
args: [[3, 4], [2, 0], [2, 1], [2, 2]]
expected: [null, [0, 0], [0, 2], [1, 0]]
description: |
A concert hall has `n` rows numbered from `0` to `n - 1`, each with `m` seats, numbered from `0` to `m - 1`. You need to design a ticketing system that can allocate seats in the following cases: