littlegandhi1199 wrote:So earlier you were saying that it was generating duplicates and you wanted to avoid that with your new version which supports multiple words?
Or did you notice that it only generates multiples in the scenario that the input has repeat letters?
If I understand the question correctly, we decided to regard eg. "Donald Duck" and "Duck Donald" as one being a permutation of the other and avoid those permutations in the main output. Later we implemented to show all permutations in a popup window, for which you can select each line ("sentence") you want to see the perms for, or all sentences. -> Right click on the ListView control to get a context menu and go from there.
In the case of duplicates for single-word anagrams: I think I/you/one always gets duplicates when there are repeated letters.
The reason for the new version to exist was, as far as I remember, to explore a can of worms
The current state of "correctly" finding anagrams is satisfactory, we don't get duplicates for single-word anagrams, and no surplus perms for multi-word anagrams.
Satisfactory is less than perfect as I am missing expected output for certain input. E.g.:
(Notice the deliberate switch from "we" to "I" here, as the responsible piece of code was written by myself, and that's where the project is somewhat stuck).
Input = "the quick brown fox" does not produce the expected sentence "brown fox quick the".
Input = "brown fox quick the" does not produce the expected sentence "brown fox quick the".