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 ...
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 ...