‫Welcome back.
‫I have a fun little exercise for you, and I know I call every single exercise fun, but I think this
‫one is especially fun.
‫Now, one of the most popular interview questions when it comes to linked lists is to reverse a linked
‫list.
‫What do I mean by that?
‫Well, an interviewer is going to say we have a linked list here.
‫How would you go about reversing this list?
‫If I have a list over here, that is 110, 16, 18.
‫How can you make the list?
‫The link list?
‫Go from 88 to 16 to 10 to 1.
‫How would you reverse it and flip it?
‫And we're going to use a singly linked list for this exercise.
‫And all we want to do is create a new method.
‫That is going to say reverse.
‫And this method in here will have to do some magic that will reverse this force.
‫Remember, we're not just printing out an array.
‫We want a reversed link list that now has 88 referencing, 16 that has referencing or pointing to ten
‫and ten pointing to one and one pointing to no.
‫How would you go about doing this?
‫Good luck with this exercise and I'll see you in The Solution video.
‫Bye bye.