Question d’entretien chez Rivian

1 algorithm question to solve.