Algorithms & Data Structures

Browse our collection of problems with interactive step-by-step visualizations.

Bubble Sort

easy

Interactive animation and code for Bubble Sort. See how adjacent elements swap and the largest elements bubble to the top.

●Sorting Algorithmsarray-barsSortingArray
O(N^2)•O(1)
Visualize

Selection Sort

easy

Interactive visualization and step-by-step implementation of the Selection Sort algorithm in multiple languages. Understand the O(n²) time complexity.

●Sorting Algorithmsarray-barssortingarray
O(O(n²))•O(O(1))
Visualize

Insertion Sort

easy

Interactive visualizer and step-by-step implementation of the Insertion Sort algorithm in multiple languages. Understand the O(n²) time complexity.

●Sorting Algorithmsarray-barssortingarray
O(O(n²))•O(O(1))
Visualize

Binary Search

easy

Interactive visualization of the Binary Search algorithm. Learn how to find an element in a sorted array in O(log n) time complexity.

●Searching Algorithmsarraysearchingarray
O(O(log n))•O(O(1))
Visualize

Linear Search

easy

Interactive visualizer for the Linear Search algorithm. Understand how to search an array element by element with O(n) time complexity.

●Searching Algorithmsarraysearchingarray
O(O(n))•O(O(1))
Visualize

Two Sum

easy

Interactive visualizer for the classic Two Sum problem. Learn how to solve it in O(n) time using a Hash Map.

●Arrays & Hashingarrayarrayhash-table
O(O(n))•O(O(n))
Visualize

3Sum

medium

Interactive visualizer for the 3Sum problem. Learn how to use Two Pointers and Sorting to find unique triplets that sum to zero in O(n²) time.

●Arrays & Hashingarrayarraytwo-pointers
O(O(n²))•O(O(1) or O(n))
Visualize

Best Time to Buy and Sell Stock

easy

Interactive visualization for the Best Time to Buy and Sell Stock algorithm. Learn the optimal O(n) approach using a single pass to maximize profit.

●Arrays & Hashingarray-barsarraydynamic-programming
O(O(n))•O(O(1))
Visualize

Reverse Linked List

easy

Interactive visualization for Reversing a Linked List. Learn how to invert pointers iteratively in O(n) time and O(1) space.

●Linked Listslinked-listlinked-listrecursion
O(O(n))•O(O(1))
Visualize

Merge Two Sorted Lists

easy

Interactive visualization for merging two sorted linked lists into one. Learn the typical O(n+m) two-pointer technique.

●Linked Listslinked-listlinked-listrecursion
O(O(n + m))•O(O(1))
Visualize