Find Anagrams in array of Strings
Problem: You are given an array of strings and you have to print all the anagrams within the array.
Group all Words in Set of Anagrams of Each Other in Dictionary
1)Use some sort of a hash structure.
2) Sort all words alphabetically and use the sorted word as the key
3) If the key is found, keep on adding the original word to the ‘value’ list of strings.
Read full article from Find Anagrams in array of Strings
Problem: You are given an array of strings and you have to print all the anagrams within the array.
Group all Words in Set of Anagrams of Each Other in Dictionary
1)Use some sort of a hash structure.
2) Sort all words alphabetically and use the sorted word as the key
3) If the key is found, keep on adding the original word to the ‘value’ list of strings.
Read full article from Find Anagrams in array of Strings