Pergunta de entrevista da empresa Walmart

LC easy on hackerrank, LC medium during live interview.