Pregunta de entrevista de Amazon Web Services

2 HackerRank problems for the second round