Harsh Wardhan
Identity: Algorithm VisualizationEducationalOpen Source

Thunderstorm

Interactive Algorithm & Data Structure Visualizer

Engineering Challenge

“How do you visualize algorithms so they click instantly?”

Developer•Completed•Creator•2026
ExecutionStep-by-StepPause & Play
AlgorithmsSortingBubble, Quick, Merge
State ArrayVisualColor Encoded
Speed ControlCustomVariable Delay
Thunderstorm
01 Problem Statement

Why I Built This Tool

Abstract algorithms are often difficult to grasp from dry code or static diagrams alone. Thunderstorm provides an interactive visual execution engine that animates array pointer movements, element swaps, and recursive partitions in real time.

Motivation

When studying competitive programming and DSA, I wanted a tool where I could pause algorithm execution mid-loop, inspect pointer states, and visually verify how different partitioning strategies behave.

02 Implementation Details

Technical Implementation

Interesting Mechanics

Algorithms execute in pure memory first, producing immutable array snapshots `[{ array: number[], activeIndices: number[], swap: boolean }]` that the React render loop plays back without mutating live algorithm variables.

Design Approach: Separate algorithm step generation from visual rendering: compute complete state snapshots first, then play back steps using controllable animation timers.

03 Technical Rigor

Engineering Decisions

Decision #01 • Precomputed Step Snapshots vs In-Flight Mutation
Problem:

Animating arrays by mutating live state directly inside recursive functions caused race conditions during pause/rewind actions.

Decision:

Refactored algorithms to execute headlessly first, returning an array of immutable step snapshots that the UI plays back cleanly.

Tradeoff:

Slight initial memory allocation for storing snapshot arrays.

Outcome:

Enabled seamless pause, step-forward, and step-backward controls without breaking algorithm state.

04 Execution Obstacles

Challenges & Solutions

Smooth Visual Element Swaps

Issue: DOM elements replacing positions instantly made it hard to follow which items were being swapped.

Decision/Solution: Utilized Framer Motion layout animations (`layoutId`) to smoothly transition swapped array bars across coordinates.

Future Improvements

What's Next

Graph algorithm visualizations (Dijkstra, BFS/DFS)
Tree traversal visualizer
Custom user array input parser
Retrospective Summary

Key Takeaways

Takeaway #01

Decoupling state computation from UI playback makes complex animation controls simple to implement.

Takeaway #02

Visual feedback accelerates algorithmic problem-solving intuition.

Continue Exploring

Related Engineering Projects