You manage 16 GB of memory. Implement alloc(size), which returns where the block starts, and free(index) — both faster than scanning a list of blocks.
You manage 16 GB of memory. Implement alloc(size), which returns where the block starts, and free(index) — both faster than scanning a list of blocks.
Unlock the full question and reference solution
One-time unlock. Yours forever.
Or get a for every question, unlimited code runs and AI mock interviews.
Opens with the full question.