CS_basics

Algorithms, data structures and system design, worked through in Java, Python and SQL — the notes and solutions behind one engineer's interview preparation.

3,267LeetCode problems indexed
133cheatsheets
49interview FAQs
36algorithm visualizers

Learn a pattern

Ordered so that one thing leads to the next, rather than by problem number.

Study roadmap A dependency-ordered path through 29 topics — what to learn next, and what it needs first. Cheat sheets Every pattern, with templates in Java and Python, ranked by how often interviews ask for it. Pattern recognition Read a problem statement, name the technique. The keyword-to-pattern table. Visualizers Step through Dijkstra, KMP, knapsack and 33 more, one frame at a time.

Practise it

Pick something to solve, then keep what you solved from going stale.

Problem explorer All indexed problems, filtered by tag, difficulty and acceptance rate, linked to the solutions here. Review plan Spaced repetition over the practice log — what is overdue, what keeps coming back, and a session picked for you. Complexity quiz Read a snippet, name its time and space. 208 questions, each with the trap it sets. Random picker One problem, drawn from the list and difficulty you choose — for when choosing is the thing stopping you.

Look something up

The index the rest of it is built from.

Problem index The full README table — every problem, its solutions, its tags and its status. Similar problems The graph of which problems share a technique, so a solved one points at its siblings. Search Every cheatsheet, FAQ and problem note, full-text. Press / from anywhere on the site. Resources The books, courses and references the notes here were built from.

Agent skills

The repo ships 9 skills for coding agents under .claude/skills/ — plain markdown, no dependencies, installed into your own agent rather than run here. These two have pages of their own.

Install one into Claude Code, Codex, Gemini or any agent that reads a markdown instruction file:

git clone --depth 1 https://github.com/yennanliu/CS_basics.git /tmp/cs_basics
cp -r /tmp/cs_basics/.claude/skills/lc-coach ~/.claude/skills/

Same idea without an agent: suggest-review is a standard-library Python script that measures which topics the practice is quietly skipping, then spends its picks on the ones that are owed them.

Complexity, at a glance

The reference charts, kept on the front page because they are the thing most often looked up. Source: bigocheatsheet.com.

Big-O complexity chart: operation count against input size for constant, logarithmic, linear, linearithmic, quadratic and exponential growth.
Table of average and worst-case time complexity for access, search, insertion and deletion across the common data structures.
Table of best, average and worst-case time and space complexity for the common sorting algorithms.

Of the problems attempted so far, 269 are marked OK and 994 are still marked AGAIN — the review plan schedules the second group. Everything here is built from the markdown in the repository — corrections welcome.