Question d’entretien chez Microsoft

Optimization Question: optimize code I wrote in interview