Implemented 2 functions to check if 2 strings are anagrams. One by sorting, other by counting the occurrence of each letter