InterviewDB
Question
Disk Storage: Simulate a File System Disk Allocator with Block Fragmentation Tracking
Question Details
Problem Simulate a disk with N blocks. Implement a storage allocator that supports: allocate(file_id, num_blocks) (find contiguous free blocks and assign them), free(file_id) (release all blocks for a file), and fragmentation_ratio() (fraction of fre…
Full Details
🔒
Unlock full leaked content
Full insider details, leaked discussions, and candidate experiences.
Get Premium →Topics
Coding
Oa