# A Semaphore caps how many fetches run at once

Canonical URL: <https://datadriven.io/problems/a-semaphore-caps-how-many-fetches-run-at-once-you-have-10-f-a9310c91>

Domain: Python · Difficulty: medium

## Problem

A Semaphore caps how many fetches run at once. You have 10 fetches, each taking 1.0s of wait, and a concurrency limit of 3. They run in waves of at most 3; total time = number_of_waves * 1.0s. Compute and print the number of waves and the total seconds (1 decimal), one per line. (Model it, no asyncio.)

## Related

- [All practice problems](https://datadriven.io/problems)
- [Mock interview mode](https://datadriven.io/interview/a-semaphore-caps-how-many-fetches-run-at-once-you-have-10-f-a9310c91)
- [Python Interview Questions](https://datadriven.io/python-interview-questions)
- [Data Engineering Interview Prep Guide](https://datadriven.io/data-engineer-interview-prep)
- [Daily Challenge](https://datadriven.io/daily)

---

Source: DataDriven (https://datadriven.io). 100% free data engineering interview prep. Live code execution against Postgres 16, Python 3.11, and Spark sandboxes. No paywall, no premium tier, no signup gate.