Tesla Interview Question

Coding challenge, can't say what it was