Tesla Interview Question

Code bit swap