Tesla interview question

Coding challenge, can't say what it was