Rocksbox Interview Question

Very reasonable and practical coding problem.