Skip to content
LyteCode
Offline, snappy, yours

Crack the coding interview,
one problem at a time.

Curated lists, an in-browser Python and JavaScript editor, complexity estimates, progressive hints, plus DSA primers and a system-design course — all running locally, nothing to sign up for.

2837 problems 2 curated lists 0 backends
lytecode.dev/problems/two-sum
1. Two Sum Easy

Return indices of the two numbers such that they add up to target.

Array Hash Table
def twoSum(nums, target):
# O(n) hash map
seen = {}
for i, n in enumerate(nums):
✓ Accepted 52 ms · O(n) time · O(n) space

Run code in your browser

Python (via Pyodide) and JavaScript, all in your browser — no install, no backend.

See your complexity

An empirical, best-effort Big-O estimate from real timing samples.

AI coach

An optional coach that runs and debugs your code, explains approaches, and reviews solutions.

Mock interviews

Practice talking through your approach under time, with an AI interviewer driving the session.

Versus mode (alpha)

Race a random opponent — or a friend — to solve the same problem first: a Matiks/NeetCode-style code-solving duel. In alpha, so expect bugs.

Pair interview

Run a live interview in one shared editor — generate a link, your interviewee joins, and you both type and run code together in real time, peer-to-peer.

Learn the patterns

Short DSA primers and a chaptered system-design course — read one, then go solve.

Your data stays yours

Notes and favorites are saved to your device with OPFS.

New

Interview together, in one editor

Create an interview, share the link, and you and your candidate write and run code in the same editor — live cursors, shared output, in real time. Peer-to-peer, with no accounts and no backend.

Start a pair interview Free · peer-to-peer
solution.py 2 connected
def two_sum(nums, target):
    seen = dict()
    for i, n in enumerate(nums):
        if target - n in seen:Candidate
            return [seen[target - n], i]

Start with a proven list

Hand-picked sets that cover every interview pattern.

All lists

Your next offer starts with one problem.

Free, private, and ready when you are.