Ideas2IT interview question

Logical reasoning and coding