Pergunta de entrevista da empresa Goldman Sachs

HackerRank coding assessment with two questions.