Arrays Visualizers

13

Step through every Arrays problem with animated runtime state, source highlighting, and curated test cases. Built for coding-interview prep and durable algorithmic intuition.

Best Time to Buy and Sell Stock
Track the lowest price seen so far and compute the best profit at every step.
Running Min + Max Profit
Contains Duplicate
Insert each number into a hash set; if it already exists, a duplicate is found.
Hash Set Lookup
Longest Consecutive Sequence
Put every number in a set, then only start counting from sequence beginnings.
Hash Set + Sequence Start
Max Consecutive Ones
Count consecutive 1s while scanning and reset the counter on every 0.
Running Count
Meeting Rooms II
Sort start and end times separately; sweep through events and track peak concurrent meetings.
Event Sweep Line
Merge Sorted Array
Fill from the back so the largest values land in their correct positions without extra space.
Reverse Three-Pointer
Missing Number
Use the Gauss sum formula: expected sum minus actual sum gives the missing number.
Math / Gauss Sum
Move Zeroes
Push non-zero values toward the front with a write pointer, then fill the tail with zeroes.
Two Pointer In-Place
Product of Array Except Self
Build prefix products from the left, then multiply in suffix products from the right.
Prefix-Suffix Product
Remove Duplicates from Sorted Array
Walk one pointer ahead to find distinct values and overwrite the front of the array in-place.
Two Pointer In-Place
Remove Element
Overwrite matching values by copying non-matching elements toward the front of the array.
Two Pointer In-Place
Reverse String
Swap characters from both ends moving inward until the pointers meet in the middle.
Opposing Two Pointers
Single Number
XOR all values together so duplicate pairs cancel out and only the unique number remains.
Bit Manipulation / XOR