Skip to main content

๐ŸŽฎ Linked Lists (Practice)

Companion to the Linked Lists guide. Watch a list reverse pointer by pointer, then code the classic three-pointer reversal.

๐ŸŽฌ Watch it workโ€‹

Reverse a Linked List โ€” re-point nextStep 1 / 7
1
2
3
4
5
Reverse a linked list by re-pointing each next backward.

๐Ÿ Your turnโ€‹

Loading editorโ€ฆ

๐Ÿง  Challenge yourselfโ€‹

  1. Detect a cycle using Floyd's fast/slow pointers.
  2. Find the middle node in one pass.
  3. Reverse only the first k nodes.

Continue the path โ†’ Recursion & The Call Stack