Back to Dashboard
Interactive Sandbox
CodeMirror Snippet Tester
A lightweight, in-browser code editor powered by CodeMirror. Write algorithmic code, inspect execution output, and test snippets against defined test cases and custom assertions.
CodeMirror In-Browser Snippet Tester
CodeMirror 6
Write interactive code and verify execution against defined test cases in real-time.
solution.js·17 lines·342 chars
Lightweight In-Browser RuntimeShortcut: ⌘+Enter to run test cases
Standard positive array
Call: twoSum([2, 7, 11, 15], 9)
Expected: [0, 1]
Non-adjacent target match
Call: twoSum([3, 2, 4], 6)
Expected: [1, 2]
Identical elements target match
Call: twoSum([3, 3], 6)
Expected: [0, 1]
Negative numbers handling
Call: twoSum([-1, -2, -3, -4, -5], -8)
Expected: [2, 4]
Lightweight In-Browser Runtime
Powered by CodeMirror 6 with syntax highlighting, automatic indentation, bracket matching, and fast browser execution.
Defined Test Cases & Custom Assertions
Evaluate algorithms against multiple inputs and expected outputs. Add your own custom test cases on the fly.
Instant Feedback & Audio-Visual Toasts
Review line-by-line test execution status, duration timings, console outputs, and confetti celebrations upon completion.