3 ms·
Incrementing on parenthesis and decrementing on closing parenthesis is trivial. You can surely agree that it's more of an ahah moment to get there, than a long
by user5994461 8y ago
Incrementing on parenthesis and decrementing on closing parenthesis is trivial. You can surely agree that it's more of an ahah moment to get there, than a long reasoning that may or may not have lead to it.
What do you do if the candidate cannot come up with the solution in 10 minutes? I've been there and find it embarrassing. It doesn't indicate aptitude or lack of aptitude.
I find that system design, performance optimization or sometimes code review have the great advantage of being progressive. The candidate can go in multiple directions. The interviewer has the opportunity to lead to find strengths and match with experiences on the resume, while it's also possible to assist or to pull away from any particular aspect.
For coding questions, either stay on simple problems with straightforward solutions, could be as stupid as printing numbers from one to ten, to test the ability to actually write code. Or a progressive exercise that must have both trivial solutions and optimized solutions and then can be integrated into a bigger function.