Tesla Interview Question

3. State Machine In C