Free · 20 weeks · no signup to start

Learn to code, then learn to pass the interview

Never written a line of code? Start at the very beginning — what a variable is, what a loop does. Already comfortable? Skip straight to the algorithms. Either way you write real code in 7 languages and see it run.

PythonJavaScriptTypeScriptJavaC++C#Go

Where are you starting?

Pick the one that sounds like you. There is no wrong answer, and you can change it later.

I've never written code

You are not sure what a variable is, and that is completely fine. Start at the very beginning.

Start here Foundations

I know the basics

You can write a loop and a function, but arrays, hash maps and Big-O are new or rusty.

Beginner

I'm comfortable coding

Arrays and hash maps hold no fear. You want trees, graphs and dynamic programming.

Intermediate

I want the hard stuff

You solve Mediums already and are aiming at senior interviews.

Expert

The 5-month roadmap

Twenty weeks, three levels — plus a Foundations track before it for anyone who has never programmed, which is not counted in the twenty. Roughly 45–60 minutes a day: one lesson plus two to four exercises.

Foundations

Never written code before? Start hereGo at your own paceLessons publishing now
  • Understand what a program actually is and what the computer does with it
  • Store and change values using variables
  • Make your code decide between options with if/else
  • Repeat work with loops instead of copying and pasting
  • Write your own functions and call them
  • Read an error message and fix your own mistake

Part 1

What a program actually is

A program is a list of instructions, followed exactly and in order. We write one, run it, and watch the computer do precisely what we said — including when that is not what we meant.

Instructions in order

Part 2

Variables and values

A variable is a labelled box you can put a value into and take it out again. Numbers, text, true/false — and why the computer cares about the difference.

Naming values

Part 3

Making decisions

Programs that do the same thing every time are not much use. if/else lets your code choose, based on a question that is either true or false.

Branching

Part 4

Repeating work with loops

The moment you would copy and paste a line ten times, you want a loop. This is the single biggest jump in what you can build.

IterationAccumulator

Part 5

Writing your own functions

A function is a named piece of work you can reuse. Once this clicks, every exercise on this site — which asks you to write one — makes sense.

ReuseInput and output

Beginner

Think like a programmerWeeks 1–7Lessons publishing now
  • Read a problem statement and predict the complexity you need before writing code
  • Use arrays, strings, hash maps and sets fluently
  • Recognise and apply the two-pointer and sliding-window patterns
  • Write and trace recursive functions without getting lost
  • Solve most Easy interview questions unaided

Week 1

How code actually runs

Before any algorithm: what the machine does with your loop, how to trace code by hand, and how to read a problem statement without panicking.

DecompositionHand tracing

Week 2

Complexity you can feel

Big-O without the maths lecture. Why O(n²) dies at n = 100,000, and how the constraints in a problem tell you the answer you are aiming for.

Complexity analysis

Week 3

Arrays

The structure every other one is built on: scanning, in-place edits, running totals, prefix sums and your first taste of Kadane.

Linear scanPrefix sumIn-place mutation

Week 4

Strings

Frequency counting, palindromes and anagrams — plus why concatenating in a loop is O(n²) in most of these languages.

Frequency countingTwo pointers

Week 5

Hash maps & sets

The single highest-leverage structure in interviews. What hashing actually is, the complement trick, and when O(1) quietly stops being O(1).

Complement lookupSeen setGroup by key

Week 6

Two pointers & fixed windows

Turn nested loops into a single pass. Opposite-end pointers, same-direction pointers, and fixed-size sliding windows.

Two pointersSliding window

Week 7

Sorting & binary search

Sorting as a tool rather than a task, custom comparators in all seven languages, and binary search — including searching on the answer.

SortingBinary searchBinary search on answer

Intermediate

Patterns that win interviewsWeeks 8–14Coming 2026-10
  • Traverse trees and graphs iteratively and recursively with confidence
  • Reach for a heap, deque or monotonic stack at the right moment
  • Design backtracking searches and prune them
  • Turn a recursive brute force into memoised then tabulated DP
  • Solve the majority of Medium interview questions

Week 8

Recursion & backtracking

Base cases, recursion trees, and the choose/explore/un-choose skeleton behind subsets, permutations and N-Queens.

RecursionBacktrackingPruning

Week 9

Linked lists

Pointer surgery without the bugs: dummy heads, fast/slow pointers, cycle detection and reversal.

Fast & slow pointersPointer reversal

Week 10

Stacks & queues

Matching brackets, min-stacks, and the monotonic stack that turns "next greater element" from O(n²) into O(n).

Monotonic stackMonotonic deque

Week 11

Binary trees

DFS and BFS on trees, the three traversal orders both recursively and iteratively, depth, diameter and path sums.

DFSBFSDivide and conquer

Week 12

BSTs & heaps

The ordering invariant that makes a BST useful, and the priority queue behind every Top-K and streaming-median question.

Top-KTwo heapsInorder traversal

Week 13

Graphs I

Once you see grids as graphs, a whole class of problems collapses into one BFS or DFS you already know.

BFSDFSConnected components

Week 14

Dynamic programming I

DP demystified: write the brute-force recursion, add a cache, then turn it inside out into a loop. One method, every 1-D problem.

MemoisationTabulationState design

Expert

Senior-level depthWeeks 15–20Coming 2026-12
  • Model a hard problem as a DP state and optimise its space
  • Choose correctly between Dijkstra, topological sort, union-find and MST
  • Implement tries, segment trees and Fenwick trees from memory
  • Design composite data structures like LRU and LFU caches
  • Communicate trade-offs the way a senior engineer is expected to

Week 15

Variable windows & intervals

Variable-size sliding windows, the at-most-K trick, and the sweep-line thinking behind every meeting-room question.

Variable sliding windowAt most KSweep line

Week 16

Graphs II

Weighted and directed graphs: topological sort, Dijkstra, union-find with path compression, and minimum spanning trees.

Topological sortDijkstraUnion-find

Week 17

Dynamic programming II

Two-dimensional state: grids, knapsack, edit distance and LCS — then squeezing the table down to a single row.

KnapsackLCSInterval DP

Week 18

Tries & string algorithms

Prefix trees for autocomplete and word search, then the string-matching algorithms that beat the naive scan.

Prefix treeKMPRolling hash

Week 19

Range queries & advanced structures

When you must answer thousands of range queries on changing data: Fenwick trees, segment trees, and binary lifting.

Range queryPoint updateBinary lifting

Week 20

Design problems & interview simulation

Composite structures — LRU, LFU, autocomplete — then timed mock interviews and how to talk about trade-offs out loud.

Composite designAmortised analysis

Questions

Is this DSA course really free?

Yes. Every lesson, every practice problem and the code runner are free, with no card required. Sign up only if you want your progress and streak saved across devices.

Which programming languages can I use?

Java, C++, C#, Python, JavaScript, TypeScript and Go. You write in a real VS Code editor, and every problem can be solved in any of the seven — you can even switch language mid-problem to compare.

How long does the course take?

It is designed as a five-month plan: twenty weeks at six to eight hours a week, which is roughly 45 to 60 minutes a day. You can go faster or slower — progress is saved either way.

Do I need any programming experience?

No. Week 1 starts with how code actually runs and how to trace a loop by hand. If you can write a for-loop you are already ahead, but it is not assumed.

How is this different from just grinding LeetCode?

Problem sites give you a verdict; this teaches you the reasoning. Every problem shows the brute-force approach first and then why the optimisation works, each concept opens with a plain-English analogy, hints are progressive rather than a jump-to-answer button, and you can see the same solution side by side in seven languages.

6 problems published so far — new lessons and problems ship every week.