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 (beta)

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

Pair interview

Run a live coding or system-design interview — share a link and work through it together in real time, peer-to-peer. Record the session to replay and export a transcript afterward.

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 — code or system design

Create an interview, share the link, and work through a coding problem or a system-design whiteboard together — with video, screen share, and live cursors. Record the session to replay and export a transcript afterward. Peer-to-peer and end-to-end encrypted, no accounts, 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.