That's what I mean, just because the question is abstracted to be pure numbers doesn't mean that it's mathematician computational type stuff. This is a basic enough task (data structures, iteration) that someone who can't do it wouldn't meet any reasonable definition of "knowing how to code".
By the way, I don't think that group includes you: I'm quite sure you'd be able to pass it in an interview context. You'd probably be paying more attention to the details of the question in an interview and I usually give sample input/output to reduce the chance of a candidate accidentally overlooking a word in the question.
I would correct to 'any reasonable definition of being a professional software developer'. There are tons of programming tasks that require coding literacy but do not require even knowing what a linked list is (e.g. simulations written by really smart people pursuing a Physics Ph.D., perl scripts done by wise UNIX-beard sysadmins, etc). That said, I agree this is a reasonable sanity-check test for someone who is asking about a developer job at a software company, and I also agree that it is easy to make mistakes in commenting an off-the-cuff answer to it on an online forum that one wouldn't make in a real interview.
I mean, I've gotten 3rd grade arithmetic wrong in my own HN comments before! ;)
> There are tons of programming tasks that require coding literacy but do not require even knowing what a linked list is
I think people are assuming that I force the candidate to do this in C or something and munge about with next pointers and sentinel nodes. They're free to do so if they'd like, but usually they have a pretty high degree of control over what language they use and in this problem, what data structure it starts in (including arrays). As mentioned upthread, that means the problem literally reduces to something like loops, iteration, conditionals, collections. These abstractions are fundamental enough that again, any reasonable definition of coding includes them. Physics PhDs writing simulations occasionally have to deal with more than one particle (or whatever), and if they have no clue how to "do X for every Y", they won't get very far.
This isn't just hypothetical for me: I've interviewed PhDs (including non-CS ones), and pretty much all of them blew past this first filter. I've worked with people whose only prior programming experience was during their math PhD, and they generally were pretty great at programming (and pretty horrible at engineering). The latter is easy to teach (this guy became one of my best engineers) but the former is much more fundamental, much harder to teach, and generally something you want at time of hire.
I think you misread the GP; the GP was stating that there are probably physics PhD students who do fine without knowing linked lists. I think you are right that knowing how to index arrays would be a necessary skill for them.
I have just learned how to merge two sorted list because I do believe it is a good thing to know and I appreciate the algorithm. I have no memorized it, just an iterative vs recursive tree traversal.
By the way, I don't think that group includes you: I'm quite sure you'd be able to pass it in an interview context. You'd probably be paying more attention to the details of the question in an interview and I usually give sample input/output to reduce the chance of a candidate accidentally overlooking a word in the question.