Reverse Linked List
Try to solve the Reverse Linked List problem.
We'll cover the following
1 of 5
2 of 5
3 of 5
4 of 5
5 of 5
Understand the problem#
Let’s take a moment to make sure you’ve correctly understood the problem. The quiz below helps you check if you’re solving the correct problem:
What is the output if the following linked list is provided as input?
4 → 2 → 7 → 8 → 9 → 0 → 2
9 → 0 → 2 → 8 → 4 → 2 → 7
7 → 2 → 4 → 8 → 2 → 0 → 9
2 → 0 → 9 → 8 → 7 → 2 → 4
0 → 2 → 2 → 4 → 8 → 9
Figure it out!#
We have a game for you to play. Rearrange the logical building blocks to develop a clearer understanding of how to solve this problem.
Try it yourself#
Implement your solution in main.py in the following coding playground. You’ll need the provided supporting code to implement your solution.
In-place Reversal of a Linked List: Introduction
Solution: Reverse Linked List