Question d’entretien chez Publicis Sapient

Leetcode type question which I'd say was easy.