Data Structures & Algorithms
Complete catalog of 99 interactive algorithm visualizers. Browse by data structure category or filter by difficulty.
Add two numbers represented by linked lists in reverse digit order, simulating column-by-column addition with carry.
Detect whether a linked list contains a cycle using Floyd's Tortoise and Hare algorithm.
Merge two sorted linked lists into a single sorted list by splicing together node pointers in O(n + m) time.
Find the middle node of a singly linked list using fast and slow pointers.
Group all nodes with odd indices together followed by nodes with even indices in O(1) space and O(n) time.
Determine if a singly linked list is a palindrome in O(n) time and O(1) space using fast/slow pointers and in-place reversal.
Partition a linked list such that all nodes less than x come before nodes greater than or equal to x, preserving relative order.
Delete all duplicate elements from a sorted singly linked list so each element appears only once.
Remove the n-th node from the end of the list and return its head using a one-pass two-pointer approach with a dummy node.
Reorder the list to L0 → Ln → L1 → Ln-1 → L2 → Ln-2 by finding the middle, reversing the second half, and merging both halves.
Reverse a singly linked list iteratively in-place by reversing the next pointer of each node.
Reverse a singly linked list from position left to position right in a single pass.
Rotate the linked list to the right by k places by connecting the tail to head and severing at (length - k % length).
Sort a linked list in O(n log n) time using top-down Merge Sort with divide-and-conquer recursion.
Swap every two adjacent nodes in a linked list and return its head without modifying node values.
