How to find anagrams in a sentence ?
Sigiloso
Hey Take all alphabet and map with a prime number. Like A = 2, B=3, C=5, D=7, E=11 etc. Now read each word in the sentence and each word char by char and make a product of those with mapping prime num. And store them in a map with key as product. Each anagram will have same product of prime numbers.