Index

Module 08 · DSAWorked problems, in English

Clinic #24: Word Search II

Pattern: Trie + backtracking · LC 212

Algorithm Design Patterns
Algorithm Design Patterns · Open board

Among its panels is a search drawn as a branching tree, with most of the branches crossed out before anyone walks them. This clinic is that crossing-out, done by a word list that knows when to give up.

Before you start. You need the tree of letters from Trees (BST, balancing, heaps, tries): every word is one path down from the top, one letter per step, and words that start the same way share their first steps; Clinic #23: Implement Trie builds one in code. You also need the move from Algorithm Design Patterns‘s chess queens: make a choice, go deeper, and undo the choice the moment it cannot work.

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.