Cheese icon

Reversing a Linked List

Author: guiferviz

Created:

Last Modified:

This interactive note demonstrates how a singly linked list is reversed using Python.

Initializing...
Initializing...

Here is a visual representation of the linked list:

Initializing...

The diagram after applying the reverse function looks like this:

Initializing...
Initializing...
Initializing...
Initializing...

You can edit the code in the reverse function cell to experiment with different logic. The diagram will update automatically to reflect the result 🙌🏽