in reply to Re^4: Words in Words
in thread Words in Words
It looks like both solutions will work!
One thing I just realized from your post about sorting is that you only need to look at words that are longer than the current word (which you are sortof doing). This means that as the program runs, it actually becomes faster at finding the results.
I ran each program for 1 minute and BrowserUk's code produced 320 records. Lotus1's code produced 150. Even though your code appears to run slower I imagine performance will improve the longer the process runs because it will have fewer records to look through each time.
I will let the programs run over the weekend to see what I get.
Thank you all for your help. I learned a lot from your examples and suggestions!