Pregunta de entrevista de Microsoft

find and write code with given problem