Recursive in 30 Seconds

If this helped, a GitHub ⭐ would be appreciated!
Your sponsorship helps support more languages like Java and C++.

Tip 1. Paste your algorithm solution as-is

Just paste your solution code, function and all. Comments are fine, and parameters are detected automatically. Fill in the inputs and hit run.

Input Example

// Sort the array in ascending order and return it
//
// Strategy
// Compare two adjacent elements and push the larger one back.
// After each pass, the largest value is fixed at the end.
// Time complexity: O(n^2)

function bubbleSort(arr) {
  const n = arr.length;
  for (let i = 0; i < n - 1; i++) {
    for (let j = 0; j < n - 1 - i; j++) {
      // Swap if the left is larger
      if (arr[j] > arr[j + 1]) {
        const temp = arr[j];
        arr[j] = arr[j + 1];
        arr[j + 1] = temp;
      }
    }
  }
  return arr;
}

Live Preview

Try pressing the buttons. In the actual app, you can modify the input values.

Tip 2. Plain code without a function works too

Code without a wrapping function runs just fine. No parameter inputs needed — just hit ▶ Run.

const arr = [5, 3, 8, 1, 2];
let total = 0;
for (let i = 0; i < arr.length; i++) {
  total += arr[i];
}
console.log(total);

Tip 3. Embed in your blog or Notion

You can embed the execution view in your blog, Notion, Obsidian, or anywhere that supports iframes. Click the Embed button at the top of the execution view to copy the iframe code. You can adjust the height too, and for Notion just use /embed and paste the URL.

<iframe src="https://recursive.oilater.com/embed?preset=bubble-sort"
  width="100%" height="600"
  style="border:none;border-radius:8px;" />

Tip 4. Supports Python and JavaScript

  • Python supports the standard library freely (collections, functools, itertools, etc).
  • JavaScript / TypeScript types are stripped automatically. Built-in APIs like Math, JSON, and Array methods all work.

Tip 5. Not supported yet

  • Async code (setTimeout, Promise, async/await) isn't supported yet.
  • JavaScript class syntax doesn't work yet.
  • Python only supports the standard library. No numpy, pandas, etc.
  • Very large inputs may cause execution to stop. Keep test sizes reasonable.
  • Java, C, C++ and others can't run directly in the browser and require a separate server. Since the project currently runs without a server, these languages are not supported yet.
  • Multi-line input (e.g. stdin-style input like on competitive programming sites) is not supported. Values can only be passed as function parameters.

Tip 6. Feedback is always welcome

Feature requests and bug reports are always welcome. Leave them on GitHub Issues. You can also contribute directly via PR.

Changelog

Features are improved based on GitHub Issues.

  • Mouse drag panning on the recursion call tree (Issue #1)
  • Python support
  • Embed support (blog, Notion, Obsidian, etc.)
  • i18n support (Korean / English)
  • Docs page added