Pergunta de entrevista da empresa SSENSE

LC questions, hackerrank was 3 hours long