Question d’entretien chez Infosys

Leetcode DSA question as it is