01 — Problem Directory

Data Structures & Algorithms

Complete catalog of 99 interactive algorithm visualizers. Browse by data structure category or filter by difficulty.

Showing 12 of 99 visualizers
ST
Stack
Medium
Asteroid Collision

Simulate asteroid collisions where positive asteroids move right and negative move left. Smaller asteroids explode upon impact.

StackSimulationArray
ST
Stack
Easy
Baseball Game

Keep score for a baseball game by processing score records, invalidations, doubling, and additions using a stack.

StackArraySimulation+1
ST
Stack
Medium
Car Fleet

Calculate the number of car fleets that will arrive at the target destination using arrival times and a monotonic stack.

StackSortingMonotonic Stack
ST
Stack
Medium
Daily Temperatures

Find the number of days you have to wait after the i-th day to get a warmer temperature using a monotonic decreasing stack.

Monotonic StackArray
ST
Stack
Medium
Evaluate Reverse Polish Notation

Evaluate arithmetic expressions written in Reverse Polish Notation (postfix) using a LIFO operand stack.

StackArrayMath+1
ST
Stack
Medium
Min Stack

Design a stack supporting push, pop, top, and retrieving the minimum element in constant O(1) time using an auxiliary monotonic min-tracker stack.

StackDesignMonotonic Stack+1
ST
Stack
Easy
Next Greater Element I

Find the next greater element for each number in nums1 within nums2 using a monotonic stack and hash map.

Monotonic StackHash MapArray
ST
Stack
Medium
Next Greater Element II

Find the next greater numeric element for every number in a circular integer array using a monotonic decreasing stack over two passes.

StackMonotonic StackArray+1
ST
Stack
Medium
Online Stock Span

Calculate the span of stock prices in an online stream using a monotonic decreasing stack tracking [price, span] pairs.

StackMonotonic StackDesign+1
ST
Stack
Easy
Remove All Adjacent Duplicates In String

Repeatedly remove adjacent, duplicate character pairs from a string using a LIFO stack until no duplicates remain.

StackStringAdjacent Duplicates+1
ST
Stack
Medium
Simplify Path

Convert an absolute Unix-style file path into its canonical simplified form using a LIFO stack to manage directory navigation, parent traversals, and redundant slashes.

StackStringUnix Path+2
ST
Stack
Easy
Valid Parentheses

Determine if an input string containing '(', ')', '{', '}', '[' and ']' is valid using a LIFO stack.

StackStringMatching