Question d’entretien chez HomeX

Q) Online Javascript Algorithm solving.