Codeway interview question

Questions around logical reasoning and algorithm design