3
votes
1answer
266 views

How can I rewrite this linked-list manipulation as tail-recursive?

This is an interview question I was once asked, and now I ask many of my interviewees. I have yet to see anyone come up with a tail-recursive solution during the interview. Given a liked list, I'd ...
11
votes
6answers
8k views

What are concrete examples of use cases of linked lists?

A linked list can be used when you want cheap insertion and deletion of elements and when it doesn't matter that the elements aren't next to each other in memory. This is very abstract and I would ...