Home
← All questions

Concurrent progress bars with a concurrency limit | Frontend Machine Coding

MediumPremiumMachine Coding

Frontend Machine Coding interview practice: Animate many progress bars but keep only N filling at a time, queueing the rest.

Problem

Render total progress bars. Only limit may animate simultaneously; when one finishes, the next queued bar starts. Each bar fills from 0% to 100% over a fixed duration.

<div id="container"></div>
function startProgressBars(total, limit) {
  // create `total` bars, run at most `limit` concurrently
}
Premium question

Unlock the in-browser editor, test cases, and model solution with Mentoxis Premium.

Unlock with Premium