Skip to content

Repository files navigation

LeetCode Flashcards — DSA interview prep for LeetCode 75 & Top Interview 150

A free, open-source flashcard app for coding interview preparation. Drill all 209 problems from the LeetCode 75 and Top Interview 150 study plans as flashcards or as a grid guessing game — each card carries a hint, an approach, time/space complexity, and a concise Python solution.

Runs entirely in your browser. No backend, no sign-up, no tracking, no runtime network calls — your progress and notes live in localStorage, with optional backup to a JSON file or sync through a secret GitHub gist you own.

▶ Try it live  ·  Features  ·  Problem coverage  ·  Run locally  ·  FAQ

Deploy to Vercel   Deploy to Cloudflare

LeetCode Flashcards — browse mode and grid game

Why flashcards for LeetCode?

Grinding problems teaches you to solve that problem. Interviews reward recognising the pattern fast — seeing "Array / String" and reaching for two pointers, or recognising a sliding window before you write a line. This app drills recall and pattern recognition rather than typing: you see a title, you commit to a problem type and a Big-O guess, and only then do you get the answer.

Features

Two study modes

  • Browse mode — a minimized card cover (title only). On the back: reveal the answer, reveal the problem type, and guess time/space complexity from a dropdown.
  • Grid game — a 4×4 board where a tile only flips when you correctly guess its type, time, and space complexity. Clear the board and load more rows.

Study plans and custom problem sets

  • Switch between All, LeetCode 75, Top Interview 150, or your own collections, built in the Sets ⚙ panel.
  • Filter by category, difficulty (Easy / Medium / Hard), or status; shuffle (s); full keyboard navigation.
  • Mark cards Got it (1) or Review again (2) — progress persists locally.

Notes per problem

A persistent scratch space attached to each problem for drafting solutions and parking ideas. One note per card, reachable from the card back, the grid tile, and the ⓘ modal, saved as you type.

Your own problems

Add custom cards via a form or batch-import JSON, and export them back out. See the JSON format below.

Sync & backup without a backend

Export or import your entire state as JSON, or keep it in a secret GitHub gist so notes and progress follow you between machines. It needs only a personal access token with the gist scope — no backend, no account system, no third party. Syncs merge per card by edit time, so two devices can both write and neither loses work.

Problem coverage

All 209 problems (75 from LeetCode 75 + the 134 Top Interview 150 problems not already in it), preloaded with statement, hint, approach, complexity, and Python solution:

Pattern Cards Pattern Cards
Array / String 31 Backtracking 8
Binary Tree — DFS 17 Two Pointers 7
Linked List 15 Heap / Priority Queue 7
Hash Map / Set 13 Math 6
DP — Multidimensional 12 Binary Search Tree 6
Binary Search 10 Matrix 5
Graphs — DFS 9 Intervals 5
Stack 8 Graphs — BFS 5
Sliding Window 8 Binary Tree — BFS 5
DP — 1D 8 Trie 4
Bit Manipulation 8 Divide & Conquer 4

Plus Queue, Prefix Sum, Monotonic Stack, and Kadane's algorithm.

Run locally

git clone https://github.com/kaziridwan/leetcode-flashcards.git
cd leetcode-flashcards
npm install
npm run dev      # dev server
npm run build    # production build → dist/
npm run preview  # preview the built bundle

Requires Node 18+. The stack is Vite 5 + React 18 with no router, no state library, and no CSS framework.

Deploy

The app is a static Vite build (output dist/) and deploys to either platform with no code changes. Use a button above, or set it up manually:

Vercel

  • Button: click Deploy to Vercel above — it clones the repo and auto-detects Vite (build npm run build, output dist). No vercel.json needed.
  • Manual: Vercel → Add New… → Project → import the repo → Deploy.
  • CLI: npm i -g vercel && vercel --prod

Cloudflare Pages

  • Button: click Deploy to Cloudflare above — it clones the repo and reads wrangler.toml (pages_build_output_dir = "dist").
  • Manual: Cloudflare → Workers & Pages → Create → Pages → connect the repo → framework preset Vite, build command npm run build, output directory dist.
  • CLI: npm i -g wrangler && npm run build && wrangler pages deploy dist

public/_redirects (/* /index.html 200) ships an SPA fallback for Cloudflare so any path resolves to the app. Vercel ignores it harmlessly.

Replace kaziridwan/leetcode-flashcards in the button links above if you fork the repo to a different path.

Custom card JSON format

A JSON array (or single object). Only title is required:

[
  {
    "title": "Two Sum",
    "difficulty": "Easy",
    "category": "Hash Map / Set",
    "link": "https://leetcode.com/problems/two-sum/",
    "hint": "Store complements in a hash map.",
    "approach": "One pass: for each x, check if target - x was seen.",
    "complexity": "Time O(n) · Space O(n)",
    "code": "def twoSum(nums, target): ..."
  }
]

See sample-import.json for a working example.

FAQ

Is it free? Yes — MIT-licensed and free to self-host. There is nothing to pay for and no account to create.

Does my data leave my browser? No, unless you explicitly connect a GitHub gist in the Sync panel. Nothing fetches on load; there is no analytics and no telemetry.

Does it use spaced repetition? Not yet. Cards use a two-bucket Got it / Review again model. An SM-2 / Leitner scheduler is on the roadmap.

Is this an Anki deck? No — it's a standalone web app, so there's nothing to install and the complexity-guessing drills and grid game have no Anki equivalent.

What language are the solutions in? Python. A per-card language toggle is on the roadmap.

Can I add my own problems? Yes — via the add form or a JSON import, and you can group them into your own problem sets.

Can I use it on my phone? Yes, the layout is responsive.

Documentation & contributing

Project documentation lives in docs/wiki/Architecture, Data Model, Features, and the Decision log.

Issues and pull requests are welcome. If you (or an agent) change the code, follow the wiki-update protocol in CLAUDE.md to keep the docs current. New to the repo? Start with agent-context/claude-code-handoff.md.

Keywords

LeetCode flashcards · DSA flashcards · data structures and algorithms practice · coding interview preparation · LeetCode 75 · Top Interview 150 · Blind 75 alternative · Big-O complexity quiz · algorithm pattern recognition · technical interview study tool

License

MIT — see LICENSE.

About

LeetCode flashcards for DSA interview prep. LeetCode 75 + Top Interview 150 problems as flashcards and a Big-O guessing game — hints, approaches, Python solutions. Free, browser-only, no backend.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages