URX interview question

Algorithm questions and a couple design questions.