See every step of the data structures, OS, DBMS, computer networks, theory of computation and compiler design algorithms you get examined on. 62 interactive tools, each with pseudocode (the running line highlighted), live variables, a practice mode and links to related LeetCode, CSES, HackerRank and GeeksforGeeks problems. Interactive visualisers that animate each algorithm one step at a time with the reasoning written out, plus a practice mode that generates fresh exam-style questions and checks every answer.
Live: https://stepwise.jashparmar.com
| Subject | Tool | What it shows |
|---|---|---|
| DSA | Sorting | Bubble, insertion, merge, quick, heap, radix and more, with pseudocode and live variables. |
| DSA | Binary search tree | Insert, delete (all three cases), search, successor and the four traversals, with nodes gliding. |
| DSA | AVL tree | Balance factors on every node and LL, RR, LR and RL rotations animated as they happen. |
| DSA | Binary heap | Min and max heaps as an array and a tree at once: sift up, sift down, build-heap, decrease-key. |
| DSA | Trie | Insert, search, prefix search, autocomplete and delete on a prefix tree that grows as you type. |
| DSA | Union-find | Disjoint sets with union by rank or size and path compression, compared with naive union. |
| DSA | Graph traversal | BFS and DFS with the queue, stack and edge types, plus components, cycles, bipartite check and topological sort. |
| DSA | Minimum spanning tree | Kruskal with a live union-find forest and Prim with its priority queue, edge by edge. |
| DSA | Shortest paths | Dijkstra, Bellman–Ford and Floyd–Warshall: every relaxation, negative cycles and the path rebuilt. |
| DSA | Strongly connected components | Kosaraju's two passes on G and its reverse, Tarjan's disc/low stack, and the condensation DAG. |
| DSA | Searching | Linear, binary, jump and interpolation search, plus lower and upper bound, probe by probe. |
| DSA | Stacks & queues | Push, pop, circular queues and deques, bracket matching, infix to postfix and postfix evaluation. |
| DSA | Linked lists | Singly, doubly and circular lists: insert, delete, reverse with moving arrows, and Floyd's cycle detection. |
| DSA | Dynamic programming | DP tables filled cell by cell with traceback: LCS, edit distance, knapsack, coin change, matrix chain, LIS. |
| OS | CPU scheduling | FCFS, SJF, SRTF, HRRN, Priority, Round Robin, multilevel and feedback queues, with a live Gantt chart. |
| OS | Page replacement | FIFO, LRU, Optimal, LFU, MFU, the clock and NRU, frame by frame, plus working sets and Belady's anomaly. |
| OS | Disk scheduling | FCFS, SSTF, SCAN, C-SCAN, LOOK, C-LOOK, N-step SCAN and F-SCAN, with the head's path drawn out. |
| OS | Banker's algorithm | Need matrix, safety check and a timeline of resource requests: is the system safe? |
| OS | Deadlock detection | Draw a resource-allocation graph and watch cycles and the detection algorithm. |
| OS | Semaphores & synchronisation | Producer–consumer, readers–writers, dining philosophers and race conditions. You pick who runs. |
| OS | Memory allocation | First, next, best and worst fit on a live memory bar, plus buddy-system splits and merges. |
| OS | Address translation | Paging with a TLB, multilevel page tables and segmentation: logical to physical, bit by bit. |
| DBMS | B+ tree | Insert, delete and search with every split, borrow and merge animated. |
| DBMS | B-tree | Keys in every node: median splits, predecessor and successor swaps, borrows and merges (CLRS t). |
| DBMS | Normalisation | Closures, candidate keys, 1NF to BCNF, minimal cover and decompositions. |
| DBMS | SQL joins | INNER, OUTER, SEMI and ANTI joins row by row, plus nested-loop, block nested-loop, sort-merge and hash join with I/O costs. |
| DBMS | Query processing | SQL to relational algebra trees, rewritten step by step: push selections down, reorder joins, estimate sizes. |
| DBMS | Serialisability | Precedence graphs, conflict and view serialisability, recoverable and strict schedules. |
| DBMS | Concurrency control | Two-phase locking with a lock table and deadlocks, timestamp ordering and validation, step by step. |
| DBMS | Log-based recovery | Crash anywhere in the log, then watch redo repeat history and undo roll back the losers. |
| DBMS | Hashing & indexing | Chaining, linear, quadratic and double hashing, plus extendible hashing. |
| DBMS | ER to relational | Draw an ER diagram in Chen notation, then map it to tables one rule at a time, with every key shown. |
| CN | Subnetting & VLSM | Network, broadcast and host range from any IPv4 address, in binary, plus a VLSM planner. |
| CN | Sliding window protocols | Stop-and-Wait, Go-Back-N and Selective Repeat on a timeline, with lost frames and ACKs. |
| CN | Routing algorithms | LSP flooding, Dijkstra and distance-vector routing, with packets hopping along the chosen path. |
| CN | TCP congestion control | Slow start, Tahoe, Reno and CUBIC round by round, plus the three-way handshake and teardown. |
| CN | Error detection & correction | CRC long division, Hamming codes that fix a flipped bit, and the Internet checksum. |
| CN | IP fragmentation | Split a datagram for a smaller MTU: fragment sizes, offsets and the MF flag. |
| CN | CIDR & longest prefix match | Forward a packet by longest prefix match, bit by bit, and summarise routes into supernets. |
| CN | MAC protocols | Pure and slotted ALOHA, CSMA/CD with binary exponential backoff, and CSMA/CA with RTS/CTS. |
| CN | Traffic shaping | Leaky and token buckets filling and draining tick by tick, plus the burst-length formula. |
| CN | DNS & HTTP | Iterative and recursive DNS lookups with caching, and HTTP page-load times for every connection type. |
| TOC | Finite automata | Run a DFA, NFA or ε-NFA on any string and watch the active states light up. |
| TOC | NFA to DFA | The subset construction with ε-closures, the DFA growing one move at a time. |
| TOC | DFA minimisation | Partition refinement: 0-, 1-, 2-equivalence until equivalent states merge. |
| TOC | Regex to NFA | Thompson's construction, fragment by fragment, for any regular expression. |
| TOC | DFA to regex & product | State elimination with edge labels rerouting as states vanish, plus union and intersection of DFAs. |
| TOC | Pumping lemma | Play the pumping game against an adversary: pick s, it splits xyz, you pick i. Can you prove L isn't regular? |
| TOC | Pushdown automata | Nondeterministic PDAs searched breadth first, the stack animated, and CFG → PDA. |
| TOC | CFG to CNF and GNF | Chomsky normal form step by step (ε, unit and useless rules, binarise), then on to Greibach normal form. |
| TOC | CYK parsing | Fill the CYK triangle cell by cell and get the parse tree for CNF grammars. |
| TOC | Turing machine | A live tape and head: aⁿbⁿcⁿ, palindromes, binary increment, busy beaver. |
| CD | Lexical analysis | A maximal-munch lexer DFA turns characters into tokens and fills the symbol table. |
| CD | Left recursion & factoring | Remove direct and indirect left recursion, then left factor, rule by rule. |
| CD | FIRST & FOLLOW | Compute FIRST and FOLLOW sets pass by pass, with the reason for every symbol. |
| CD | LL(1) parsing | Predictive parsing table, conflicts, and a stack trace that grows the parse tree. |
| CD | Operator-precedence parsing | LEADING and TRAILING, the ⋖ ≐ ⋗ table, precedence functions and shift-reduce parses. |
| CD | LR parsing | LR(0), SLR, LALR and CLR: item sets, tables, conflicts and bottom-up parses. |
| CD | Syntax-directed translation | Annotated parse trees: synthesised and inherited attributes evaluated in dependency order. |
| CD | Three-address code & DAG | Syntax tree to TAC, DAG with common subexpressions, quadruples and triples. |
| CD | Code optimisation | Leaders, basic blocks and the flow graph, then folding, propagation, CSE and dead code, one rewrite at a time. |
| CD | Register allocation | Liveness to a fixed point, the interference graph, then Chaitin's simplify, spill and select with k registers. |
GATE practice
/gate serves endless GATE-format questions (MCQ, MSQ and NAT) on ten OS and DBMS topics. public/js/gate-questions.js builds each one from a seed with the same engines the visualisers run, so answers are computed, never typed in. Marking follows GATE (a wrong MCQ costs a third of its marks; MSQ and NAT have no negative marks), every question has a worked solution and a link that replays it in the visualiser, and progress per topic is kept in localStorage. To add a topic, write a generator, register it in TOPICS, and add its slug to public/js/gate-link.js; test/gate.test.js checks 150 seeds per topic.
Why it's built this way
- Correctness first. Each algorithm is a pure engine (
public/js/engines/) that returns the full list of steps, and the UI only renders them. The engines are tested against the worked examples in Silberschatz's Operating System Concepts and Database System Concepts, Kurose & Ross's Computer Networking, Tanenbaum's Computer Networks, Hopcroft, Motwani & Ullman's Automata Theory and Aho, Lam, Sethi & Ullman's Compilers (the Dragon Book), plus a property test that runs 12,000 random B+ tree inserts and deletes across orders 3–7 and checks every invariant (sorted keys, balanced leaves, fill limits, the leaf chain) after each one. - Conventions are stated, not hidden. Textbooks disagree on tie-breaking, Round Robin arrival order and B+ tree split points, so every page lists the rules it follows. Answers match what an examiner expects.
- One step player for everything. Play, pause, step back and forward, scrub, change speed, use the keyboard. Every visualiser shares it.
- Diagrams that move. State diagrams, item-set automata, parse trees and DAGs are laid out automatically (layered, barycentre-ordered) and nodes glide between steps instead of redrawing.
- Ask about this step. An AI tutor on every tool sees the step note, the highlighted pseudocode line, the variables and any practice question, and answers in context (hints, not answers, for practice). It runs on Cloudflare Workers AI by default, or Gemini if
GEMINI_API_KEYis set; it is rate-limited and stores nothing. - Shareable. Every input is in the URL, so a student can send the exact question they're stuck on.
- Almost no backend, no dependencies. Plain ES modules served as static assets from Cloudflare's CDN; the only server code is the tutor endpoint (
src/worker.ts). Each tool's code loads only when opened.
Production setup
- One registry (
public/js/tools.js) drives routes, menus, the home page, titles and the sitemap. Adding a tool means one entry plus its engine, view and tests. - Real URLs and SEO.
npm run buildwrites a page per tool (/cpu-scheduling, …) with its own title, description, canonical link, Open Graph tags andLearningResourcestructured data, plussitemap.xml,robots.txtand a 404 page. Old/#/cpulinks redirect. - Offline. A service worker, versioned by a content hash at build time, precaches every tool; the site is installable as an app.
- Resilience. Failed loads show a retry screen, unexpected errors show a reload prompt, and every route has a loading state.
- Security and caching. Strict CSP, HSTS,
nosniff, a locked-down Permissions-Policy; scripts revalidate on every load (so a deploy is never half-applied), icons cache for a week. - Tests. 353 tests: textbook examples (Silberschatz, Dragon Book, Hopcroft–Ullman…), fuzz suites running every engine on thousands of random inputs against invariants, and module checks that every file parses and every view loads. CI runs them plus the production build on every push.
Develop
npm test # 102 tests
npm run dev # http://localhost:8793 (serves public/)
npm run preview # build, then serve dist/ like production
npm run deploy # test, build, deploy to Cloudflare
