LeetTutor
Initializing Python…
🔌 Chrome Extension Available
💡 Tip: Install the companion Chrome extension to auto-import code directly from the LeetCode editor — no copy-paste needed. Learn more →
Python Solution & Inputs
Examples:
_result =
Execution trace — highlighted line = where Python is right now
Just ran
About to run
Paste your solution above and click ▶ Trace to begin.

Run a trace to inspect variables.

#LineVariables
No trace loaded.

Run a trace to see an estimated time/space complexity for your code.

Step 0 / 0
Paste code and click ▶ Trace to begin stepping through execution.
Speed