Pregunta de entrevista de Tech Mahindra

Some basic Algorithm and logical reasoning