<s>[INST] ### About this project/post

This is a LeetCode problem. The problem asks to determine whether two given strings are anagrams or not.
An anagram is a word or phrase formed by rearranging the letters.
For example, "listen" and "silent" are anagrams because they have the same letters, arranged differently.

### Problem statement:
Given two strings s and t of length n, return true if s is an anagram of t, or false otherwise.

**LeetCode Problem: Valid Anagram**

### My code so far
I'm trying to implement this using python. Here's my code below:

```python
def isAnagram(s: str, t: str) -> bool:
    # Check if the strings have the same length
    if len(s) != len(t):
        return False

    # Convert the strings to lists and sort them
    s_list = sorted(list(s))
    t_list = sorted(list(t))

    # Compare the sorted lists
    if s_list == t_list:
        return True
    else:
        return False

# test the function
s = "listen"
t = "silent"
print(isAnagram(s,t))
```

### My main issue
The reason I posted about this is that I think my current solution is inefficient because of the sorting operation. Is there a better way to solve this problem without sorting?[/INST]