5 ms·
No, it's not a test of whether you know it, it's a test of whether you can implement it. If the candidate doesn't know/recall what BFS is, it's trivial to demo
by jpatokal 11y ago
No, it's not a test of whether you know it, it's a test of whether you can implement it. If the candidate doesn't know/recall what BFS is, it's trivial to demonstrate the basic idea on a whiteboard, and it's the candidate's job to convert the idea into code. (Which, at the end of day, is pretty much what the vast majority of coding is about.)
- stegosaurus 11y agoI edited my post. Yes, this makes sense, if the interviewer describes what they're actually after. I have experienced (on both sides of the table) situations in which it just hasn't happened. 'Can you do X?' 'What is X?' 'Never mind, let's move on'.
- ams6110 11y agoIt's still not realistic. People don't code on whiteboards. You code (today) with all the resources of the internet at your fingertips, and if you need to invert a binary tree you will use a well-tested implementation from a standard library.
- catnaroek 11y agoI know for damn sure that, if I'm implementing something algorithmically tricky (not BFS, though), I first sketch the details on a whiteboard or a piece of paper.
- TheCoelacanth 11y agoIt's not supposed to realistic. It's supposed to be a test of programming ability that fits into an hour interview with time left over for talking about other things. Real world projects last months or years. You can't fit that into an hour, so you have to make do with something that can.
- LamaOfRuin 11y agoWhich is why they're not asking you to do it in an actual job. It's a proxy problem that is easy to communicate so you're not spending the entire interview explaining the problem. Arguably, fleshing out a spec would also be a valuable test, but not the same one.
- kuschku 11y agoPeople often do code on Whiteboards – but not actual code, but diagrams, plans, etc.
- catnaroek 11y agoSometimes actual code too. For instance, if I'm designing an optimization pass for a compiler, I'll write toy IR programs and show how the optimization pass will rewrite them. And I'll do it on a whiteboard.
- kuschku 11y agoYup. But the thing I meant is that you illustrate things, not actually code your application code.