Question d’entretien chez Amazon

Can't remember but it's Leetcode's medium difficult question