Tickertape interview question

[code] swap numbers