Pregunta de entrevista de Marshall Wace

easy/medium leetcode style questions through Codility