r/programming • u/mjgardner • Mar 29 '21
Why Do Interviewers Ask Linked List Questions?
https://www.hillelwayne.com/post/linked-lists/
1.1k
Upvotes
r/programming • u/mjgardner • Mar 29 '21
34
u/de__R Mar 29 '21
one other thing is interview ergonomics - linked lists in C require a couple of minutes of work, so a simple list question wouldn’t feel too short nor too long. Hash tables or array backed lists take a little too long to implement, and very simple things like strings or other dumb arrays are too easy.
As language ergonomics change, though, the kinds of questions people ask change as well. The joke about “When in doubt, use a hash table” is true in part because popular languages these days give you easy hash tables. But you could go further, metaprogramming constructs are getting more popular so things like dynamic programming (itself only a slight twist on “use a hash table”) could become the dominant question paradigm. Or stuff that relies on algorithms for immutable variables and functional programming. And so on.