Linked lists: Reversing a linked list

A recursive solution to the linked list reversion :slight_smile:

I think it works, but for a non-trivial size, it would trigger a stack overflow since Java can only hold a limited number of recursive calls on the stack. This implementation requires that stack to be as large as the linked list which is probably not great.

For that reason alone I would only ever use an iterative approach for this problem. That being said, still a useful exercise. If you found a tail recursive solution, that would be slightly more useful since a future version of Java could implement tail recursion optimization which would collapse the stack when possible.