3 ms·
It depends. I think your code should be readable - try to make good variable names if it doesn't slow you down, but as long as they're not actively misleading e
by telotortium 5y ago
It depends. I think your code should be readable - try to make good variable names if it doesn't slow you down, but as long as they're not actively misleading even code with short names like "x" will be comprehensible at the program sizes written during interviews - because the interviewer will need to review your code after the interview and making it comprehensible can only benefit you. Especially if you don't get it quite right, it's much better for you if your interviewer can look at your code and see the minor bug fix needed, versus having to take your nonfunctional code as given. On the other hand, don't waste much time on "future needs", at least for hour-long interviews - YAGNI definitely applies here.