4 ms·
I disagree. If you know what a binary search tree or linked list is, you should be able to code them. If you can't do something this simple, how can you be expe
by jchonphoenix 16y ago
I disagree. If you know what a binary search tree or linked list is, you should be able to code them. If you can't do something this simple, how can you be expected to actually solve a problem that you can't just look up the answer too?
- jonafato 16y agoI'll agree with this on one condition: don't hold syntax errors against me. I interviewed for a position about eight months ago. I was rusty with my C (had been doing more java and python around that time), and put "int i = 0" in a for loop on a white board and seemingly had it counted against me. This kind of thing, along with things like missed semicolons, should be ignored by interviewers. Not only is it a simple fix, it also says nothing about the logic in the code.
- nostrademons 16y agoThat's even legal syntax in C99.
- aplusbi 16y agoWhat makes you think it was held against you? Most programmers can be kind of OCD about code and would want to point out that kind of error, whether they thought it was relevant to your abilities or not.
- matwood 16y agoUnless I've needed a specific language, like SQL for example, anytime I've asked a candidate to code on the whiteboard pseudocode has always been fine.
- thornkin 16y agoAssuming you mean for (int i = 0; ; ) {} that is legal syntax. Perhaps I'm dull, but what is the error?
- lunaru 16y agoI think the point was that in C(89) you need to declare all variables at the beginning of the scope block.
- j_baker 16y agoCan't code one on a whiteboard != can't code one
- tgflynn 16y agoWell I know that I've solved a few problems in my time: like developing a multi-threaded distributed object-oriented control system, implementing a JPEG2000 encoder, a convolutional neural net, as well as solving a number of debugging problems that escaped my colleagues. I also know I failed miserably at a trivial coding task in an interview. So I don't know. If I'm the only one who has that kind of problem, maybe my brain works differently from other people's.
- yason 16y agoHow trivial? What was the task, then? And what where the conditions? Were you required to remember some nitty details? In an interview, you can fail in almost anything, depending on how nervous you are.
- tgflynn 16y agoThe problem was: given the following prototype implement the function void move( char** colNames, int toColumn, int fromColumn ); The function should move the column name at index fromColumn to the position toColumn. (It does not swap the columns.) Now I just spent 43 min implementing this with a compiler and some trial and error. During the interview I was expected to do it with pen and paper. Now my IQ is above the 99th percentile but apparently there are people who can do this sort of thing in their head without errors and that's what some interviewers appear to be looking for. That's why this post hit home for me, though personally I probably wouldn't have had much trouble with linked lists.