Forwords and Backwords
December 28, 2006
Posted by on
A ‘forword’ is a word in which all the letters are in alphabetical order, with no repeats. Here are the longest ones I could find, using a particular word list I have on my computer (all six letters):
If you allow repeats, there’s also ‘beefily’ and ‘billowy’ (at seven letters).
Backwords are the same, in reverse. The longest are (at seven letters):
If you allow repeats, there’s also “trollied,” at eight letters.
QuickNDirty Ruby code:
def inorder? (word)
fmt = "a"*word.length
srt = (word.unpack(fmt)).sort.uniq.reverse
while (line = gets) do
puts line if inorder?(line) and (line.length >= 7)