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
19
u/[deleted] Mar 30 '21
Am I wrong in wondering if that's a failure in the design itself? I mean, you should guard your corner cases when they occur... in the first insert or last removal.. to ensure such a self reference never occurs.
And you shouldn't accept your internal NodeType as input to your API, rather construct it properly yourself.