Hard data structure and algorithm practice puzzle.
Given a page table as a tree and a virtual address as one index per level, return the physical frame, or -1 for a page fault. A node holds a frame number at a real mapping and 0 where nothing is mapped. Unlike a routing table this walk is all or nothing: you must arrive at the bottom, because a partial translation is not a worse answer, it is a fault. Every load and store your program issues does this, which is why the result is cached in a TLB.
Solve it three ways: snap the jigsaw pieces together, fill in the blanks, or type it from scratch against the tests. This one is free.
Browse all 536 puzzles