100% free · TypeScript · four weeks

Data Structures and Algorithms

Data structures and algorithms are how a program stores values and the steps it uses to work on them. This course is 100% free. You read a short lesson, write the function in TypeScript, and find out at once whether it holds. The articles are open if you want the longer explanation of a term before you sign up.

datastructuresandalgorithms.com

Nothing to buy
The course is 100% free

Short lessons, a few exercises on each, then a slightly harder follow-up. An editor, tests, and a progress page that stays on your account. Articles, with diagrams, for when a term needs more than the lesson.

No trial period, no card, and no lesson or article held back for a paid plan.

What you get

A month of practice for people who already write TypeScript and want the structures under the code they ship.

100% free

Every lesson, the articles, the editor, the tests, and your progress. No trial, no card, and nothing locked behind an upgrade.

One idea per lesson

Each lesson is short enough to finish in a sitting. You leave with a function you wrote, not a playlist you half watched.

A desk, not a video

The lesson and a TypeScript editor open side by side. Flip the split horizontal when you want the editor underneath. You can run the code in the terminal before you submit.

Tests on every exercise

Public examples show the shape of the answer. Hidden tests check the cases that are easy to forget. You see the result when you submit.

A tick when it passes

Pass an exercise and it keeps a green tick. Pass every exercise in the lesson and the lesson is done. If an attempt fails, open the solution: an explanation and an example you can run. Or skip without points and come back later.

Yours when you come back

The account keeps your code. Progress shows lessons done, exercises passed, your pass rate, and what you skipped or still need to pass. Light and dark mode stay with the browser.

Four weeks of course material

Thirty-eight lessons and eighty-four exercises. Basics first, then the structures, then the patterns. Work in order, or turn on audit mode to open any lesson. A lesson is complete when every exercise in it passes.

Week 1

Foundations

Learn to name time complexity and Big O, then practice the scans you will reuse all month.

  • Time complexity and Big O
  • The cost of a pair
  • Arrays
  • Moving the middle
  • Hash maps
  • Counting with a map
  • Two pointers
  • Pointers that meet
  • Sliding window
  • Grow, then shrink
Week 2

Core structures

Build the structures interviews expect, and a sort you can explain out loud.

  • Linked lists
  • A second pointer
  • Stacks
  • Remember what is still open
  • Queues
  • First in, first served
  • Recursion
  • Two recursive calls
  • Binary search
  • The empty range
  • Sorting with merge sort
  • Comparing sorting algorithms
Week 3

Trees and graphs

Walk hierarchical data, keep a priority queue, and search a graph.

  • Trees
  • Leaves and totals
  • Binary search trees
  • BST height and insertion order
  • Heaps
  • Parents and children
  • Graphs and breadth-first search
  • Connected components
Week 4

Patterns

Finish with the patterns that turn a hard problem into a smaller one.

  • Greedy algorithms
  • Try to break the rule
  • Backtracking
  • When order matters
  • Dynamic programming
  • From the base case upward
  • Tries
  • Words that share a path

Articles beside the course

64 explainers for the terms the lessons use. Each one answers a specific question, with a diagram, the cost, and a worked example. A lesson links the terms it mentions, and you can read them without an account. Quicksort, disjoint-set union, and directed acyclic graphs are extra reading, past the exercises.

Browse the articles

How a lesson goes

The coding desk is built for a computer, where the lesson and the editor can sit open together.

01

Read the lesson

The reading states the cost and the trade in plain language. The bitesize explanation adds a diagram, a TypeScript example you can run, and the mistakes that usually show up.

02

Write the function

The starter is already in the editor. TypeScript checking runs as you type, and you can run the code in the terminal before you submit.

03

Submit

The tests run straight away. A pass marks that exercise done. When every exercise in the lesson passes, the next one opens. After a failed attempt you can open the solution, or skip the lesson without points and come back.

Questions about data structures and algorithms

Short answers, kept in the open so you can read them before you sign up.

01

Is this data structures and algorithms course free?

Yes. The course and the articles are 100% free. Creating an account, the lessons, the editor, the tests, and saved progress do not cost anything. There is no paid tier. You can read the articles before you sign up. Sign up with Google, GitHub, or an email and password.

02

What are data structures and algorithms?

Data structures and algorithms are how a program stores values and the steps it uses to work on them. A structure is the arrangement, such as an array, hash map, tree, or graph. An algorithm is the procedure, such as a search, a sort, or a traversal.

03

How do I learn data structures and algorithms?

Learn data structures and algorithms by writing them. This 100% free course is four weeks of TypeScript: read the lesson, open the bitesize explanation for a diagram and a runnable example, implement the exercises, and submit each one against tests. A lesson is done when every exercise passes. Terms in the lesson link to articles you can read without an account. A new account gets a short introduction, including the choice to browse with audit mode.

04

Which data structures and algorithms does the course cover?

The path covers complexity, arrays, hash maps, two pointers, sliding windows, linked lists, stacks, queues, recursion, binary search, merge sort, trees, binary search trees, heaps, graphs, greedy choices, backtracking, dynamic programming, and tries. The articles cover those terms. Quicksort, disjoint-set union, and directed acyclic graphs are extra reading, past the exercises.

05

Who is this data structures and algorithms course for?

It is for people who already write TypeScript and want the structures and algorithms used in interviews and production code, without a semester of theory first. The coding desk is meant for a laptop or desktop. The articles are reading pages, so you can open them without the desk.

100% free