Question d’entretien chez PTC

I was asked to implement "swap" function