Question d’entretien chez Expedia Group

It was a hard Hackerrank algorithm question