I'm finally getting around to keeping a promise — sharing my phone screen experience for Tesla Dojo. The coding difficulty was medium-to-hard, but the bar for detail was very high. Hope this is useful for anyone else interviewing for Dojo.
The interviewer showed up a little late, and jumped straight into coding with barely any small talk. Tesla's efficiency is really something.
You're given a list of length n. Determine whether the list is a permutation of [0, 1, 2, ..., n-1]. In other words, the list should contain every integer from 0 to n-1, each appearing exactly once.
LeetCode 50, pow(a: float, b: int): return a**b
Pretty standard coding questions, but the bar was high.
For the first question, I wrote a solution using a boolean list, and he wasn't happy about it — he said it used too much memory and wanted no extra space at all. His focus was very clear: in-place checking with no extra memory, basically done with XOR. And he wanted the code to be pythonic — use list comprehensions, any, all, and replace for-loops wherever possible.
For the second question, he wanted no extra memory except for the recursive call stack. I solved it with recursion plus a DP cache, but I didn't land on the result he was looking for.
Overall impression: the problems weren't hard, but Tesla cares a lot more about your coding style and whether you push for the optimal solution. If you can write clean, concise, expressive Python code, that's a real plus.
The interviewer was pretty easygoing — he gave a lot of friendly hints, pushing me toward the solution he wanted.
Discussion
Loading comments…