Number of Ways to Form a Target String Given a Dictionary
Characters are taken column by column from left to right, so a table of prefixes by columns counts every valid choice exactly once.
Characters are taken column by column from left to right, so a table of prefixes by columns counts every valid choice exactly once.