You can find if 2 strings are anagrams after sorting both strings in O(nlogn) time, however is it possible to find it in o(n) time and O(1) space.
Absolutely no expert here...
But why not go through each string and simply count how many times each letter turns up.
Given appropriate implementation, this shouldn't take more than O(n) time.