Anagram (from Wikipedia) – An anagram is a type of word play, the result of rearranging the letters of a word or phrase to produce a new word or phrase, using all the original letters exactly once; for example, the word anagram can be rearranged into nag-a-ram.
This YouTube video explains in detail. https://www.youtube.com/watch?v=lVGNs-DAzfc
This code project gives source code for Anagram. http://www.codeproject.com/Articles/251749/Really-Simple-Anagram-Solver