completefrontend
PRACTICE IN 7 LANGUAGES

Data structures & algorithms

Every algorithm you need, explained from zero in plain words: an everyday example, the steps, a picture you can step through, the JavaScript, and where frontend code uses it. Then practice each one with problems you solve right in your browser, in JavaScript, TypeScript, Python, Java, C++, Go, or C#, and earn XP, levels, and badges as you go.

180 algorithms751 problems180 step-through picturesBeginner to expert

Level 1 · Newcomer

0 XP · 50 XP to level 2

Solved
0 / 751
Easy
0 / 249
Medium
0 / 350
Hard
0 / 152
Streak
0 days

Badges 0 of 14

  • First solve0 / 1: Pass every test of any problem.
  • Warmed up0 / 10: Solve 10 problems.
  • Half century0 / 50: Solve 50 problems.
  • Century0 / 100: Solve 100 problems.
  • Hard hitter0 / 1: Solve a hard problem.
  • Heavy lifter0 / 10: Solve 10 hard problems.
  • On my own0 / 10: Solve 10 problems without hints or the solution.
  • Three in a row0 / 3: Solve something 3 days in a row.
  • Week streak0 / 7: Solve something 7 days in a row.
  • Unstoppable0 / 30: Solve something 30 days in a row.
  • Daily habit0 / 5: Finish 5 daily challenges.
  • Well rounded0 / 19: Solve a problem in every section of the algorithm map.
  • Gold medal0 / 1: Solve every problem of one algorithm.
  • Curious mind0 / 10: Read 10 algorithm pages.

How to practice here

  1. Learn the ideaOpen an algorithm on the map. Each page starts with an everyday example and builds up to the code.
  2. Watch it runStep through the picture: see each pointer move and each value change, with the line of code that did it.
  3. Solve its problemsEach page lists its problem numbers. Solve them in the playground, with Tuto beside you for hints.
  4. Level upEarn XP for each solve, keep a daily streak, take the daily challenge, and collect a medal for every algorithm.

The algorithm map

180 algorithms in 19 sections

Every algorithm and technique, in learning order. Click a name to learn how it works, or a number to solve one of its problems. Medals show how many of its problems you’ve solved.

Foundations

How to measure an algorithm's speed and memory, and the basic ways to attack any problem.

0 of 5 started
  • Big O notationNot started

    A short way to say how the work an algorithm does grows as its input gets bigger.

    foundation0 / 2 solved
  • RecursionNot started

    A function solves a problem by calling itself on a smaller piece of the same problem.

    foundation0 / 11 solved
  • Brute forceNot started

    Try every possible answer, check each one, and keep the best.

    foundation0 / 3 solved
  • Measure the average cost of each operation over a long run, so a rare expensive step is shared by many cheap ones.

    core0 / 2 solved
  • SimulationNot started

    Follow the rules of a process step by step, exactly as described, and report the final state.

    foundation0 / 15 solved

Arrays & hashing

Count, remember, and add up values in one pass with hash maps and running totals.

0 of 16 started

Two pointers

Walk two positions through the data at once to skip work a nested loop would repeat.

0 of 5 started

Sliding window

Keep a moving range over a list and update it as it slides instead of starting over.

0 of 3 started

Searching & binary search

Find a value, a boundary, or the best answer by throwing away half the options at a time.

0 of 9 started

Sorting

Put values in order, and use that order to make other problems easy.

0 of 14 started
  • Bubble sortNot started

    Sort a list by walking through it again and again, swapping any two neighbors that are in the wrong order.

    foundation0 / 2 solved
  • Selection sortNot started

    Sort a list by finding the smallest remaining item and moving it to the front, one position at a time.

    foundation0 / 2 solved
  • Insertion sortNot started

    Sort a list by taking items one at a time and sliding each one left into its place among the items already sorted.

    foundation0 / 5 solved
  • Merge sortNot started

    Split the list in half, sort each half, then merge the two sorted halves into one sorted list.

    core0 / 8 solved
  • Quick sortNot started

    Pick one item as a pivot, move smaller items before it and the rest after it, then sort each side the same way.

    core0 / 5 solved
  • Heap sortNot started

    Arrange the list into a max-heap, then repeatedly move the biggest item from the top of the heap to the end.

    core0 / 2 solved
  • Counting sortNot started

    Sort small whole numbers by counting how many times each value appears, then writing the values back in order.

    core0 / 5 solved
  • Radix sortNot started

    Sort numbers digit by digit, starting from the last digit, using a stable bucket pass for each digit.

    advanced0 / 3 solved
  • Bucket sortNot started

    Spread the values into a few ranges (buckets), sort each small bucket, then join the buckets in order.

    advanced0 / 2 solved
  • Shell sortNot started

    Run insertion sort on items far apart first, then on closer and closer items, ending with a normal insertion sort.

    advanced0 / 2 solved
  • TimSortNot started

    Find the already sorted stretches (runs) in the list, extend short runs with insertion sort, then merge the runs.

    advanced0 / 3 solved
  • QuickselectNot started

    Find the k-th smallest item without sorting everything, by partitioning around a pivot and keeping only the side that holds position k.

    core0 / 4 solved
  • Tell JavaScript's sort how to order items with a compare function that returns a negative, zero, or positive number.

    foundation0 / 19 solved
  • Count the pairs of items that are in the wrong order, in O(n log n), by counting during merge sort's merge step.

    advanced0 / 6 solved

Linked lists

Chains of nodes that point to the next one: rewire, reverse, and race through them.

0 of 6 started

Stacks & queues

Last-in-first-out and first-in-first-out lists that remember exactly what you need next.

0 of 8 started

Recursion & backtracking

Solve a problem with smaller copies of itself, and explore choices then undo them.

0 of 7 started

Trees & tries

Parent-child structures, like the DOM: walk them, search them, and combine answers from children.

0 of 13 started

Heaps & priority queues

Always get the smallest or largest item fast, even while items keep arriving.

0 of 5 started

Graphs

Things connected to other things: explore them, order them, and find the cheapest paths.

0 of 23 started

Dynamic programming

Break a problem into overlapping smaller problems and save each answer so it's solved once.

0 of 16 started

Greedy & intervals

Make the best-looking choice at each step, and order and merge ranges of time or space.

0 of 7 started

String algorithms

Find patterns, palindromes, and repeats in text faster than checking every position.

0 of 9 started

Math & geometry

Number tricks and shapes: divisors, primes, powers, counting, and overlapping boxes.

0 of 11 started

Bit manipulation

Treat numbers as rows of on/off switches to store flags and answer questions in one step.

0 of 5 started

Advanced data structures

Purpose-built structures for fast range questions, caches, and membership checks.

0 of 5 started
  • Segment treeNot started

    A tree over an array where each node stores the sum (or min, or max) of a range, so range questions and single-item updates both take O(log n).

    advanced0 / 3 solved
  • Fenwick treeNot started

    A compact array that keeps running totals so you can add to one item and get any prefix sum in O(log n).

    advanced0 / 7 solved
  • Sparse tableNot started

    Precompute the minimum of every range whose length is a power of two, then answer any range-minimum question in O(1) with two overlapping lookups.

    advanced0 / 2 solved
  • LRU cacheNot started

    A fixed-size cache that, when full, throws out the item that was used least recently, with every operation in O(1).

    core0 / 4 solved
  • Bloom filterNot started

    A tiny bit array that answers "have I seen this before?" with "definitely not" or "maybe", using a few hash functions and far less memory than a set.

    advanced0 / 3 solved

Algorithms in frontend work

The algorithms inside the tools you use every day: DOM walks, diffing, fuzzy search, and more.

0 of 13 started