Pehchaan interview question

Logic Reasoning and coding fundamentals