4 ms·
Well, you'll be surprised how many candidates can't correctly write a function to reverse a single-linked list.
by vl 15y ago
Well, you'll be surprised how many candidates can't correctly write a function to reverse a single-linked list.
- cageface 15y agoThey're probably nervous because you've asked them to solve a weird problem they've never had to solve in the real world. Have you actually written, in shipping code, a single-linked list or an elementary algorithm to operate on one? Unless you want them to implement a compiler or something, I think you'll learn a lot more about somebody's programming abilities by asking them to turn a list of use cases into a class diagram or write out a few SQL queries given for a given set of tables.
- cousin_it 15y ago"A compiler or something" huh? Let's see. Would you hire someone who couldn't reverse a linked list, if you wanted to develop... Google Chrome? Adobe Photoshop? Crysis 2? An IPad? A self-driving car? Not all programming is boring business stuff with SQL and class diagrams. And even "boring" apps may be more tricky than they look: Microsoft Excel had its own bytecode interpreter, which definitely qualifies as "a compiler or something" :-)
- vl 15y ago>Have you actually written, in shipping code, a single-linked list or an elementary algorithm to operate on one? Yes, I have. Admittedly, I had to do it much more often when STL was a toy. But this is not the reason for this question, this is simple coding exercise, if a candidate can't do it without bugs in 10 minutes, there is nothing to talk about. Of course jobs not requiring writing C++, Java, C#, or Python code need different set of questions.