Algomination
Data Structures
AboutContact

Algomination

Learn algorithms and data structures through smooth, interactive visualizations.

SortingSearchingArray AlgorithmsData StructuresAboutContact

© 2026Algomination. Created by Omang Rawat & Rahul Soni.

Omang Rawat
Rahul Soni

Array Algorithm Visualizers

The patterns behind countless interview problems — two pointers, sliding windows, monotonic stacks and more — animated step by step.

Kadane's Algorithm (Maximum Subarray)

Finds the contiguous subarray with the largest sum in a single pass. Works with negative numbers by restarting the running window whenever it would only drag the total down.

Time O(n)Space O(1)

Two-Pointer Pair Sum

On a sorted array, finds two values that add up to a target using a pointer at each end — moving them inward based on whether the current sum is too small or too large.

Time O(n)Space O(1)

Sliding Window (Max Sum of K)

Finds the maximum sum of any K consecutive elements. Instead of re-adding the whole window each time, it slides one step — subtracting the element that leaves and adding the one that enters.

Time O(n)Space O(1)

Dutch National Flag (3-Way Partition)

Partitions an array into three regions — less than, equal to, and greater than a pivot — in one pass with three pointers. The classic problem of sorting an array of 0s, 1s, and 2s.

Time O(n)Space O(1)

Trapping Rain Water

Computes how much water is trapped between bars of an elevation map. Two pointers walk inward from both ends, resolving the shorter side first since its limiting wall is already known.

Time O(n)Space O(1)

Next Greater Element

For each element, finds the first larger value to its right using a monotonic stack of indices that are still waiting for their answer. Each index is pushed and popped at most once.

Time O(n)Space O(n)