Simplest algo for checking if two strings are an anagram is :
sort_by_letters(a_string)==sort_by_letters(b_string)
Example:
Words "LISTEN" and "SILENT" sorted alphabetically both equals to "EILNST".
BTW, you should learn sorting algorithms very good, because they are prerequisite to other types of algorithms for solving bunch of problems.