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!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^6: Words in Words (Updated)
by BrowserUk (Patriarch) on Oct 01, 2011 at 10:54 UTC | |
by choroba (Cardinal) on Oct 01, 2011 at 13:43 UTC | |
by BrowserUk (Patriarch) on Oct 01, 2011 at 19:01 UTC | |
by sarchasm (Acolyte) on Oct 02, 2011 at 20:28 UTC | |
by choroba (Cardinal) on Oct 02, 2011 at 20:55 UTC | |
by sarchasm (Acolyte) on Oct 03, 2011 at 00:06 UTC | |
| |
by BrowserUk (Patriarch) on Oct 01, 2011 at 14:55 UTC | |
by choroba (Cardinal) on Oct 01, 2011 at 19:09 UTC | |
by BrowserUk (Patriarch) on Oct 02, 2011 at 02:47 UTC | |
| |
Re^6: Words in Words
by BrowserUk (Patriarch) on Oct 01, 2011 at 00:40 UTC |