| # | Call | Expected | Result | Run |
|---|
Loading…
| # | Call | Expected | Result | Run |
|---|
| ← → | step back / forward |
| Space | play / pause |
| R | restart playback from step 0 |
| L | toggle loop (wrap at the end) |
| O / U | step over / step out (by stack depth) |
| [ / ] | jump to previous / next milestone |
| T / F | answer a branch question True / False |
| Enter / Esc | submit / skip a predict question |
| . after a name | typed member completions (seen. → dict methods) |
| ( after a callable | signature help — enumerate(, nums.sort(, your own helper( |
| Ctrl+Space | word completion in the editor |
| Tab / Shift+Tab | indent / dedent selection |
| ? | this help |
#x=my:…) and saving again updates it.#x=…&s=…) into a note to pin the exact problem, case and step you were looking at.[2,7,11,15], 9 and the app builds the real call (trees/lists/graphs included). Fill Expected for pass/fail. The ? beside the panel title explains the input formats.t = Trie() then t.insert("apple"), or a plain script — leave every row blank and press Run. It traces the file itself, top to bottom. A case is only there to call something the code merely defines.dp[i] = …), swaps, appends, pointer chases (slow = nums[slow]), computes (mid = (lo+hi)//2), branches (True/False), and prints.i, lo, left…) pointing at their cell — drawn only into arrays the code actually indexes with that variable.i") — column i reads vertically across them.dp[i] = dp[i-1] + cost[i]).ε = the empty prefix at 0).⇒ chips on a dict mean its values are positions in another structure (seen: 'b': 1 ⇒ s[1]='b').out[i] = nums[i], res.append(arr[i])).None. Hover reads a cell; click a row to jump.[[0]*n]*m warning.2i+1 / 2i+2.⋯n⋯ in big arrays marks elided ranges (head + tail + pointer neighborhoods are captured).r - l + 1, len(heap), gcd(a, b)); sparklines plot them per step. Expressions are JavaScript over the current variables, with helpers: aggregates len, sum, avg, min, max, abs; sequence probes first, last, count(x, v), distinct, contains(x, v), isSorted; math floor, ceil, round, sqrt, sign, log2, pow(a, b), gcd(a, b), bitCount. Loaded problems suggest chips from their known techniques.i, nums[i], right - left + 1, len(stack)). Lists and dicts are tracked as themselves, so a column can hold [1, 3, 5] or {a: 1}, not just a number. “Changes only” keeps it to one row per iteration instead of one per executed line; click a row to jump to that step, or Copy to paste the table into your notes.isSorted(a), lo <= hi, sum(bucket) == n). A green/red strip shows where it holds vs breaks, and the first break flags the scrubber — this is how you check why an algorithm is correct, not just what it does.Call fib(3), dp[i] = dp[i-1] + dp[i-2] = 5, x > 5 → true), highlighting the current one and letting you click any line to jump.grid = [[0]*n]*m shows every row-arrow hitting one shared box — the classic mutable-default trap made visible.
Dear Fellow Coder,
I built this tool with a simple goal: to help you sharpen your coding skills, build confidence, and grow through meaningful, hands-on practice. Whether you're learning your first concepts, preparing for an interview, or taking the next step in your engineering career, I'm cheering you on and wishing you every success along the way.
The platform currently supports Python, but this is only the beginning. More features, challenges, and improvements are already on the horizon.
Your feedback is an important part of this journey. Please share what you enjoy, what feels unclear, and what you'd love to see next. Every suggestion helps shape the platform into a more useful and inspiring place for learners and engineers like you.
Your privacy comes first. CodeViz has no sign-ups and never stores your code. Whatever you write runs only to build the visualization — it is never saved, logged, or shared, and your work stays right here in your browser. Any usage analytics and crash reports are aggregate and anonymous, and never include your code or personal details.
Keep learning, keep building, and never stop being curious.
Warmly,
Do you even need one?
A case exists to call something your code only defines. If the
code already runs on its own — a script, or a class followed by a
few calls like t = Trie() and t.insert("apple")
— leave every row blank and press Run: CodeViz traces the
file top to bottom. You only need a case for a bare
class Solution that nothing invokes.
Otherwise each row in the table is one test case. Type the input in the Call column in whichever of these three shapes is handiest — there is no mode to pick, CodeViz reads which one you used:
1 · Just the arguments (LeetCode style)
CodeViz reads each parameter's type from your solution and builds the call for you:
Bracket values convert by the parameter's type:
[1,2,3] → list[3,null,4] → binary tree (TreeNode)[[2,4],[1,3]] → graph / 2-D grid2 · Named arguments (when there are several)
Prefix each value with its parameter name and a colon — handy for spotting which argument is which. The names come from your function's signature:
3 · The full call (with the class / method name)
Write it out and CodeViz runs it exactly as typed. A call on something
your code built — trie.insert("apple") — is
always written this way, since only you know the object's name.
Whichever shape you use, the same call runs; CodeViz keeps the row reading back the way you wrote it, so there is no badge to click and nothing to switch.
Running them
Expected is optional — fill it in and the Result column ticks when it matches. The comparison is forgiving about whitespace and quote style, and null / true / false are accepted (they become Python None / True / False).