Utility for the PPCG question [Count to 20 with Words!][countTo20WithWords].
To generate those outputs, just run:
python algo.py
Of course you will need [wordListsByLength]. There are parameters that can be easily modified inside the script.
The scores are computed as follow:
- each prefix/suffix/contained word adds its length to the score.
- when all prefixes/suffixes/contained words are computed, add the number of prefixes/suffixes/contained words to the score.