The other day, I saw the following brain-teaser posted on Reddit:
along with the claim that “Startling” is the only 9 letter word where you can remove one letter at a time and still have a word.
Let’s see if that’s true using IPython and a long list of words from http://www.mieliestronk.com/wordlist.html
[ed. note in 2018 – this link expired. I’m not quite sure where it went. Sorry!]It turns out that there are seven words of length 9 that match this property, and one word of length 10: “Splittings” (actually an incredibly relevant word to this problem).
Just goes to show: don’t believe everything you read on the internet 😉
The problem with recursion (and this solution) is that it only finds the first answer when there may be many. Here’s a divergence from one of your answers – it doesn’t change the number of words, but it’s interesting that you can take different paths with some of the words.
TRAMPLING
TRAMPING
TAMPING
TAPING
APING
PING
PIN
IN