DSA Tools

Interactive companions for the DSA course. Everything runs in your browser — your code never leaves it, and no login is needed. Scroll to explore each tool.

What's new

12 recent updates · scroll for older
  • 21 Sep · Time Complexity Playground: A loop over range(n) after n = len(arr) is now read as len(arr), at high confidence.
  • 21 Sep · Time Complexity Playground: Python itself now checks your code's syntax, and a count that never changes is flagged.
  • 21 Sep · Time Complexity Playground: The + or - inside range(...) now costs 1, as in the notes: factorial is 3n + 1.
  • 21 Sep · Time Complexity Playground: Inner loops like range(len(arr) - i) are now counted as n(n + 1)/2, not n².
  • 20 Sep · Recursive Functions Visualizer: Chart how your own function's calls grow with n, not just the examples'.
  • 20 Sep · Recursive Functions Visualizer: Quick sort's analysis works out both cases instead of reporting Unknown.
  • 20 Sep · Time Complexity Playground: Quick sort, pasted in, gets the same two-case derivation.
  • 19 Sep · Recursive Functions Visualizer: Merge sort and quick sort, and a chart of calls against n.
  • 19 Sep · BT/BST Coding Assistant: Keep your practice questions and save them as Markdown or PDF.
  • 19 Sep · Heap Visualizer: The binary heaps page's removal example loads with one press.
  • 19 Sep · Time Complexity Playground: Names O(n log² n) and O(n³ log n), and says when a benchmark is too small to trust.
  • 11 Sep · Heap Visualizer: Heap sort runs both phases: it builds the heap, then drains it.

Time Complexity Playground

Paste a Python function and walk through the course's 5-step Big-O derivation: variables and T(n), a per-line operation-count table, simplification, and the final class — then benchmark real runtimes against theoretical curves.

  • 5-step analysis of loops and recursion
  • Safe in-browser benchmarking with charts
  • Built-in course examples

Recursive Functions Visualizer

Write a recursive Python function and watch it run: frames push and pop on the call stack while the call tree draws itself, with repeated calls flagged — plus time and space analysis on demand.

  • Step-by-step call stack and call tree replay
  • Trace your own code, sandboxed
  • Recurrence-method time & space analysis

BT/BST Coding Assistant

Generate fresh binary tree and binary search tree practice questions for the final's coding part — solve first, then reveal the full solution with complexity analysis and walkthroughs.

  • Four question types: iterative/recursive × BT/BST
  • Solutions stay hidden until you ask
  • Your OpenRouter key, your choice of model

Heap Visualizer

Watch a binary heap work step by step: insert with sift-up, extract with sift-down, heapify a list, and heap sort building its sorted tail — animated in the tree and the array at once.

  • Min-heap or max-heap, your choice
  • Insert one by one or heapify any list
  • Scrub back through every compare and swap

Graph Visualizer

Draw a graph, then watch it work: breadth-first and depth-first traversals, Dijkstra's shortest paths, and Prim's and Kruskal's minimum spanning trees — animated on the graph and on its adjacency matrix and list at once.

  • Draw nodes and weighted edges, or load a course graph
  • BFS, DFS, Dijkstra, Prim, Kruskal — step by step
  • See the adjacency matrix and list update live

Balanced Trees Visualizer

Pick a tree type, then insert values one at a time and watch it take shape: a plain binary search tree, an AVL tree, a red-black tree, or a 2-3 tree — with every comparison, rotation, recolour, and split explained as it happens, and four ways to traverse a BST.

  • Choose a tree type, then build it one insertion at a time
  • See why sorted input turns a BST into a stick
  • Rotations, recolours, and median promotions, step by step
  • Traverse a BST: pre-, in-, post-order, and BFS

The tools assist your DSA reasoning — they don't replace it.