</>OfferRetriever
DashboardDiscuss
NEW

July 4th Sale

Limited Time Deal: Unlock all premium questions for over 40% off

$10.42$6.25

10

:

09

:

32

:

01

Get this deal
Back to Dashboard

Uniform Array Segmentation

Hard

A task distribution system needs to split a workload evenly among workers. You are given an integer array tasks of length n and an integer workers, where n is always divisible by workers. Randomly distribute all tasks into workers groups, where each group contains exactly n / workers tasks. Each task must appear in exactly one group.

There can be multiple valid outputs since the distribution is random. ...