DStruct Logo
dStruct

Your code, frame by frame

A LeetCode-style playground where your solution drives a synced visual debugger: trees, graphs, grids, linked structures, and nested maps. JavaScript and Python in the browser, step-by-step replay, and optional timing stats for JS.

Common questions →Daily problem →

How it works

A LeetCode-style playground where your solution drives a synced visual debugger: trees, graphs, grids, linked structures, and nested maps. JavaScript and Python in the browser, step-by-step replay, and optional timing stats for JS.

1
Write your solution

Use the built-in editor with familiar patterns for each project category.

2
Run and record

Tracked APIs turn structural work into a callstack of frames—no canned animation.

3
Scrub the timeline

Step forward and backward, change speed, and inspect each operation in the log.

Built for clarity

See the algorithm, not just output

Replay how your data structures change. Understand and debug with a real execution trace.

Smooth UI while code runs

JavaScript runs in a Web Worker; Python uses Pyodide in its own worker so the page stays responsive.

Time-travel playback

Play, pause, step, replay, and tune playback speed—including keyboard shortcuts.

Benchmark JavaScript

Measure many runs with median, percentiles, and a chart. Benchmark mode is JS-only today.

Two languages, one playground

JavaScript

Runs locally in a worker—no round-trip for visualization. Full benchmark support.

Python

Real CPython via Pyodide in the browser—no install needed. Preloads when you open a Python solution; first visit downloads the runtime (cached afterward). Standard library only.

Try example playgrounds

Jump into a curated example—or open the full project browser.

Binary tree
Browse Projects

Common questions

Visual playback comes from dStruct's tracked data-structure APIs. Pick a matching project category and use the wrappers the playground expects. Plain objects without those APIs may print output but won't produce a step-by-step replay.

Trees, BST, linked lists, graphs, grids and matrices, arrays, heaps, stacks, trie, DP, two pointers, sliding window, backtracking, and more. Browse the playground or check categories when creating a project.

No for normal use. JavaScript runs in a Web Worker; Python runs with Pyodide in the browser. A local Python server is optional for developers only.

By default, no—execution happens in your browser. Saving projects, sign-in, and browsing cloud projects use the backend like any web app.

Yes. Projects can store separate JS and Python solutions. Benchmark mode is JavaScript-only today.

Pyodide preloads in the background when you open a Python page. The first visit downloads the runtime (~30 MB, then cached); WASM startup can take a few seconds even from cache. After that, Run is usually quick.

Not in the default playground—standard library only. Third-party imports will fail.

Python times out after 30 seconds by default; the worker is then recreated. Cancellation is coarse for very heavy work.

Use public projects and the editor without signing in. To persist projects, test cases, and named solutions, sign in.

Yes. Make a project public and use Browse to discover examples.

Optional profile features, pasting a LeetCode problem URL to fill metadata, and shortcuts to open the same problem on LeetCode. Submitting solutions still happens on LeetCode—dStruct is a companion playground.

Yes, for JavaScript—use Benchmark mode (many iterations, median, percentiles, chart). Python does not have benchmark mode yet.

There is a mobile-friendly playground flow with keep-alive when switching tabs. Long editing sessions are still easiest on desktop.

Yes. See the LICENSE file in the repository (AGPL-3.0).
© Max Kayander, 2026.