Pregunta de entrevista de Microsoft

Two coding questions they asked