Back to problems

Disk Space Manager / KV Store with setAll

Object-Oriented Programming · NVIDIA · Medium

Requirements Disk Capacity Manager Create the manager with a fixed overall capacity. Provide: Rules: Calling put(id, size) inserts a dataset or overwrites the dataset already associated with that ID. When free space is insufficient, the manager is permitted to remove other datasets until it can fit the new one. Unless a policy is given, the removal strategy is unspecified; if permitted, using LRU is a sensible option. Return an error / false when the incoming dataset exceeds…

Checking your access…