Question d’entretien chez DevSoft Philippines

Algorithm question through Hackerrank test