Reverse Linked List
Fun Algorithms
Today, let's go over a very common interview question that's asked and it is to reverse a singly linked list. The solution is to use a while loop and reverse out pointers. However, because the implementation is a little difficult to follow, let's first go through how we can print out all the nodes first. I will then walk through how the reverse implementation changes the structure of our list. Finally, we'll see what our reversed head node becomes.

Comments (1)
Adrian Borcea
7 years ago
Brian Voong
7 years ago
Adrian Borcea
7 years ago
HELP & SUPPORT