4 ms·
I think the best questions to ask are those that tests someones ability to take a well defined process, and ask them to simply represent it in code. DSA questio
by didibus 9y ago
I think the best questions to ask are those that tests someones ability to take a well defined process, and ask them to simply represent it in code. DSA questions are often more about problem solving, and I don't think problems are solved in 20 minutes of a stressed induced whiteboard interview. So its often a matter of luck if the person finds the solution in time or not. Luck beeing if they've recently practiced and reviewed similar problems and their solutions.
If you can find a question where the algorithm and technique is given, basically you give the solution but in prose, and they have to translate the solution in code. Then you ask questions that has the candidate reason about various aspects of the code he wrote like: How fast do you think it'll be, how much memory would it consume, how easy is it to extend, how can it be tested, how easy is it for others to read, where is it most likely to fail, how could it be scaled, etc.
You could ask say, I've got a bunch of fruits, there's apples and bananas and pears. They need to be labeled with their price, and put into distinct baskets. The price is calculated based on their weight and which kind of fruit they are. Banana is weight * 0.3. Apple is ..., etc.
There's no trick to this question, no problem to solve. All that's needed is can you model this process in code in a way that's maintainable, testable, efficient, extendable, scalable and do that quickly enough. This question doesn't require any practice or reviewing of theory prior to the interview. Questions of that sort have worked the best for me.
Caveat: This works when you need a good generalist that's well rounded. If you need a specialist, you expect them to know and be well practiced and versed in the specialty. But you almost never need a specialist.
Disclaimer: I've currently conducted around 40 interviews, a mix of on-site and phone, for both hiring junior and senior software engineers. So that's the sample size that lead me to believe this works well.