Domanda di colloquio di Rocksbox

Very reasonable and practical coding problem.