X interview question

Implement a write/read thing, optimize on read.