About this playground

What it is

A learning assistant for the algorithm-analysis part of DSA. Paste a Python function and the app walks through the course's 5-step Big-O derivation: the code, the variables and T(n), a per-line operation-count table, the T(n) expression, its simplification, and the final Big-O. An optional benchmark measures real runtimes in your browser and plots them against theoretical complexity curves.

What it is not

  • It is a study aid, not a grader or a verifier. It reports a confidence level and its assumptions, and when it cannot count a pattern reliably it says "Unknown / needs instructor review" instead of guessing.
  • It recognizes the loop and recursion patterns covered in the course notes. Code outside those patterns may get a partial answer or none at all.
  • A benchmark shows measured runtimes on your machine — it suggests a growth rate, it never proves one. Small inputs are dominated by measurement noise and constant factors.

Privacy

  • Your Python code is analyzed locally, in your browser.
  • Benchmarks also run locally, in a sandboxed Python runtime (Pyodide) inside a Web Worker. Nothing is sent to any server.
  • No login is required and no database is used.
  • Your editor draft is saved to this browser's localStorage so a refresh does not lose your work; it never leaves your device.
  • If you use AI mode, your code and the local analysis are sent to OpenRouter and the model provider you selected — only when you click an AI button, and never anywhere else. Your OpenRouter key stays in memory unless you explicitly tick "remember my key on this device".
  • Do not paste private, sensitive, or assignment-confidential code into AI mode unless your instructor allows it.

Security

  • Benchmarked code never runs on a server or on the page itself — only inside the worker's Python sandbox, which is terminated on timeout or cancel.
  • Before benchmarking, code is checked against an allowlist: imports, file access, eval/exec, and introspection built-ins are rejected.
  • The site sends a strict Content-Security-Policy, so pages can only talk to the app itself, the jsdelivr CDN (which serves the Python runtime and the code editor), and — in AI mode — openrouter.ai.

Version

Version 1 supports Python only, analyzes worst-case complexity, and keeps everything client-side.