Question d’entretien chez Meta

Array/string manipulation with optimization (maybe DP?) required to pass all the tests