Interview Algorithm Challenge: Reverse Linked List - Swift

Profile Picture
Published on Feb 17, 2019🌏 Public

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. Facebook Group https://www.facebook.com/groups/12406... iOS Basic Training Course https://www.letsbuildthatapp.com/basi... Completed Source Code https://www.letsbuildthatapp.com/cour... Follow me on Twitter: https://twitter.com/buildthatapp