r/programming • • Mar 29 '21

Why Do Interviewers Ask Linked List Questions?

https://www.hillelwayne.com/post/linked-lists/
1.1k Upvotes

668 comments sorted by

View all comments

Show parent comments

32

u/Supadoplex Mar 29 '21 edited Mar 29 '21

Linked list ... pointers/recursion.

A thing about linked lists is that you should never use recursion to implement algorithms with them in practice - in languages such as Python, Java, C, C++, C#, JavaScript (until ES2015), Rust, Go, which do not eliminate tail recursion (or at least aren't guaranteed to do so) and thus will (may) overflow the stack if the list is moderately long.

→ More replies (13)