Pregunta de entrevista de Amazon Web Services

To write the code for the given problem statement