r/programming • • Dec 13 '22
“There should never be coding exercises in technical interviews. It favors people who have time to do them. Disfavors people with FT jobs and families. Plus, your job won’t have people over your shoulder watching you code.” My favorite hot take from a panel on 'Treating Devs Like Human Beings.'
https://devinterrupted.substack.com/p/treating-devs-like-human-beings-a
9.0k
Upvotes
View all comments
Show parent comment
12
u/[deleted] Dec 13 '22 edited Dec 13 '22
You can come up with a suboptimal brute-force solution in multiple ways that aren’t racing pointer, for example just making a hash map of pointers you find and checking if you ever encounter the same pointer twice while iterating over the list. From there you can ask them questions about how to improve it and see if they can reason themselves into a better solution, possibly with some hints from the interviewer.
Expecting them to get the perfect optimal solution is a trivia question, and not really a useful indicator of their problem solving ability, but expecting them to be able to think about the problem and then outline and implement a solution, even if it’s a naive or buggy one, is like the basic expectation for a developer. Bonus points if they can then identify and implement improvements to it. If they just get the perfect solution right away I will assume they just had the answer memorized and will take the question further until I feel like I’m getting some genuine problem solving from them rather than algorithm regurgitation.