Most of these answers are horribly inefficient and/or will only give one‑word solutions (no spaces). My solution will handle any number of words and is very efficient. What you want is a trie data structure. Here's acompletePython implementation. You just need a word list saved in a ...
and recreates a string composed of the sorted letters of the word; it creates a list of all the these sorted letters strings, in the same order as the original sequence of words --> this will be used to compare the possible anagrams (the letters of anagrams produce the same string when...
To exclude the words that only differ in capitalization, we could just remove the duplicates (case-insensitvely) from the input list, i.e.$input|sort -uwhere-ustands for-unique.sortis case-insenstive by default: $k=@{};$input|sort -u|%{$k["$([char[]]$_|%{$_+0}|sort)"]+=...
The capitalized words make up an anagram that provides a hint on where to find the next clue. 标色字在重新排列顺序后,就会提示下一条线索的所在。 ParaCrawl Corpus In this document you will profile the Anagram Game sample application. 在本文档中,将对 Anagram Game 样例应用程序进行性能分析...
So now I have a list of words, where I can access the canonical version of the Strings they hold. I need an algorithm to create "sub lists" which are lists of which contain a set of words which are anagrams of eachother. So if I have: ...