Solve every problem in ten minutes, on the first try.

AlgoRung is where your DSA practice lives: a curriculum organised by pattern, a revision schedule for every problem you solve, and notes on every mistake you make along the way.

Problems
231
Topics
14
Revisions per problem
2
Recursion tree for subsets of [1, 2]: at each element you either pick it or skip it, giving four subsets. pick 1 skip 1 pick 2 skip 2 pick 2 skip 2 [ ] [1] [ ] [1,2] [1] [2] [ ]
subsets([1, 2]) two choices per element, four subsets

One problem, three rungs

Solving a problem once proves you understood it that day. AlgoRung schedules two revisions after the first solve, so the pattern is still there in the interview.

  1. Sat

    Class

    Learn the pattern from the session. Watch for the idea, not the code.

  2. Sat–Sun

    First solve

    Code it yourself. When you get stuck, write down where before you look at a solution.

  3. Tue

    Revision 1

    Solve it again from a blank editor. Log your time, attempts and every mistake.

  4. Thu

    Revision 2

    One more clean run. Under ten minutes in one attempt and the problem is yours.

Class on Sunday instead? The schedule shifts with it: first solve Sun–Mon, revisions on Wed and Fri.

The curriculum

231 problems from LeetCode, GeeksforGeeks and NeetCode, grouped by the pattern each one teaches. Follow the roadmap from arrays to dynamic programming, or jump to the topic your next class covers.

A method for every problem

The same eight steps, whether it's Two Sum or Burst Balloons. Talk before you type. Brute force before you optimise.

  1. Read the question twice.
  2. Run an example to check you understood it.
  3. List the edge cases.
  4. Find a brute force and test it on those edge cases.
  5. Explain the approach with its time and space complexity.
  6. Optimise, then test the edge cases again.
  7. Explain the optimised approach and its complexity.
  8. Code it.

Subsets II

Pick / Not-Pick, Recursion & Backtracking

Mistake

Skipped duplicates at every depth instead of only among siblings.

// sort first, skip equal siblings only
for (int i = start; i < nums.length; i++) {
  if (i > start && nums[i] == nums[i - 1]) continue;
  path.add(nums[i]);
  backtrack(nums, i + 1, path, out);
  path.remove(path.size() - 1);
}
First solve24 min, 3 attempts
Revision 111 min, 1 attempt

Your next revision is waiting.

Create your account