Skip to content
Advertisement

Reverse Linked-List Recursive

I’ve traced through my code to reverse a linked-list using recursion, and I cannot find anything wrong with it, but I know it does not work. Can anyone please explain why?

JavaScript

Advertisement

Answer

Below is a working version of your code, added with some helping structures:

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement