Tesla interview question

Code bit swap