Index

Module 02 · DSAChoosing the attack

Algorithm Design Patterns

Algorithm Design Patterns
Algorithm Design Patterns · Open board

A catalog of five moves, a search tree with most of its branches crossed out before they’re walked, and a guide for reading a new problem’s shape. This lesson is about picking the right move on the first try, not inventing one.

Before you start. You’ve already picked up five tools in this track - arrays, hash maps, trees, graphs, and the trick of a problem asking a smaller copy of itself from the last lesson. This lesson is not a sixth tool. It is how you choose between the five you already have, in the first thirty seconds of reading a new problem.

Continue reading with a plan

The first three lessons of every track are free. This lesson is included with a plan, which unlocks every lesson, board, video, lab and paper for one price.

View plans →Already a member? Sign in

Lab

Grabbing the biggest coin that fits gives the fewest coins with 1, 5, 10 and 25. Does it with any coins?

Pick 1, 3, 4 under The coins, set The amount to make to 6, and watch Coins greedy wasted.

Open The greedy bet →

Review DSA →

Saved in this browser, and to your account when you sign in.