chrisjacksonn/interview-sim / skills/sim
sim
VerifiedRun a timed coding assessment simulation in the terminal. Use for OA practice, GCA or ICA mocks, mock interviews, pairing rounds, take-homes, and pasted job postings.
questions/gca/room-schedule/problem.md
View on GitHub# Room Schedule
Meetings are booked as `(start, end)` pairs, where a meeting occupies the room
from `start` up to but not including `end`.
Write `solve(meetings)` returning the smallest number of rooms needed so that no
two meetings share a room at the same moment.
- A meeting ending exactly when another starts does not need a second room.
- A meeting with `start >= end` occupies nothing and is ignored.
- Meetings arrive in no particular order and may be duplicated.
## Examples
```python
solve([(0, 30), (5, 10), (15, 20)])
# 2
# The long meeting overlaps both short ones, but the short ones do not overlap
# each other.
solve([(0, 5), (5, 10), (10, 15)])
# 1
# Each ends exactly as the next begins.
solve([(1, 4), (1, 4), (1, 4)])
# 3
solve([])
# 0
```
## Constraints
- `0 <= len(meetings) <= 200_000`
- Times are integers and may be negative.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |