Find the starting point and track from letter to adjacent letter horizontally and vertically, but not diagonally, for each of the above to spell out a twelve letter word.
Each of the vacant cells must be filled with a letter, whether same or different. Every letter per cell (for each of the parts) must be used.
FOR xmpl = 1 TO 2
OPEN "\words\words12.txt" FOR BINARY AS #1
w$ = SPACE$(12)
GET #1, , w$
IF EOF(1) THEN EXIT DO
s$ = w$
good = 1
FOR i = 1 TO LEN(musthave$)
ix = INSTR(s$, MID$(musthave$, i, 1))
IF ix = 0 THEN good = 0: EXIT FOR
s$ = LEFT$(s$, ix - 1) + MID$(s$, ix + 1)
IF good THEN PRINT w$
PRINT : PRINT
is designed to find all those 12-letter words that contain all the letters in a given puzzle, repeating any repeated letters at least as many times as present in the given table. It finds for the two puzzles:
Inspection shows that the two words that can be formed are praiseworthy and experimental.
Posted by Charlie
on 2013-01-21 18:05:23