Back to problems

Experiment Bucket Allocation / Rebalancing

Object-Oriented Programming · Pinterest · Medium

ID Allocation Rebalancer Medium · Array, Simulation, Greedy · Company Tags · Hints You are managing a set of 1000 unique identifiers, numbered from 0 to 999 (inclusive). Several groups each own a subset of these IDs; ownership is globally disjoint — no ID belongs to more than one group at the start. Your task is to rebalance the allocation according to new desired sizes for each group. The desired size can be expressed either as an absolute count of IDs (desiredSize) or as a…

Checking your access…