Pregunta de entrevista de Uber

Make a Scheduler in javascript with some given concurrency.

Respuesta de la entrevista

Anónimo

19 oct 2018

Just make a function which would take a concurrency integer argument and return an AddTask function. As and when you call a function (task) increase a pointer by 1. Once it's equal to concurrency number, push it to an array. Once done, reduce the RunningTask variable by one.