i just xor the hash of character. it pass, but i think it may have some collision.

```
class Solution(object):
def findAnagrams(self, s, p)
if not s:
return []
n = len(p)
hp = reduce(lambda a,b:a^b, iter(hash(c) for c in p))
hs = [hash(c) for c in s]
hash_s = reduce(lambda a,b:a^b, hs[:n])
result = []
for i in range(len(s)-n):
if hash_s == hp:
result.append(i)
hash_s = hash_s ^ hs[i] ^ hs[i+n]
if hash_s == hp:
result.append(len(s)-n)
# print(hp)
# print(s[9:9+n], p)
return result
```