4 ms·
> There's a reason [basic CS algorithms and data structures] are considered the fundamentals in CS, even if they are baked into most languages nowadays. A link
by thomascgalvin 8y ago
> There's a reason [basic CS algorithms and data structures] are considered the fundamentals in CS, even if they are baked into most languages nowadays.
A linked list is such a fundamental piece of technology, and so obvious to anyone that's been working in a language for a while, that I feel it's perfectly acceptable to rule out a candidate who cannot write one.
It doesn't have to be perfect, and it doesn't have to have all of the optimizations and utility methods that you find in the standard libraries, but the ability to understand and work with a node that has a value and a pointer to the next node is kind of bare-minimum competency, isn't it?
- BurningFrog 8y agoThe linked list is such a fundamental piece of technology that you never have to implement it. I mean, I understand the linked list quite well, but in my multi decade software career, I've probably actually implemented one less than once a decade. So I think it's a very unrealistic interview question, and will sigh quite hard (internally) when asked to implement one in an interview. You just can't please everyone...
- thomascgalvin 8y agoI agree, if you implement a linked list in production code, you've almost certainly made a mistake. My point is that a linked list is such a simple concept that anyone with real programming experience should be able to write a basic implementation. It's a Shibboleth; I only care about your ability to perform the task because it tells me something else about you.
- BurningFrog 8y agoOK, I have to kinda agree. It almost levels the playing field in the sense that since no one actually writes these things, we're probably all equally half clumsy with them :)
- SamReidHughes 8y agoFor linked lists I'd regard the question really being about whether the candidate understands pointers.
- crooked-v 8y agoFizzbuzz serves a similar role.
- creato 8y ago> The linked list is such a fundamental piece of technology that you never have to implement it. Is this a good reason not to ask it in an interview? I'd expect any competent software engineer to be able to implement a linked list without too much trouble. It's maybe not a great interview question (depending on your point of view, you may not consider it to contribute much positive or negative hiring signal), but I don't consider it a "gotcha" question the way a lot of people seem to.