Clockwise interview question

Standard system design and coding exercises.