Feb-08-2017, 01:29 AM
(Feb-07-2017, 07:34 PM)buran Wrote:Sorry, didn't meant to say it was not as good or worse than my original effort! Just that it was still taking time. But as Ofnuts clarifies, your 2nd suggestion where I check to see if the 10 letter words in the words file (which in my case happens to be a mere 2000 or so) are made up of the same letters as the states is waaay more efficient. That's basically 2000 comparisons as it were.(Feb-07-2017, 07:16 PM)sumithar Wrote: that code while simpler didn't perform all that wellwell - the itertools is optimized and provides functions for creating iterators for efficient looping. I don't see how it could be less efficient than your code. my snippets runs 15 mins to generate all permutations.
My original effort and your modified approach using itertools were still doing 46x47x48x49x50 comparisons weren't they?