check anagram using sorting approach