Ezvor

2636. Promise Pool

Medium Preparing judge… LeetCode

Hints

Hint 1
Initially execute all the functions until the queue fills up.
Hint 2
Every time a function resolves, add a new promise to the queue if possible.