Here's my code:
def isIso(x,y):
if len(x) != len(y):
return False
for i in range(len(x)):
count = 0
if x.count(x[i]) != y.count(y[i]):
return False
return True
Why do all solutions for this question online involve mapping or dictionaries? I'm wondering why everyone seems to be overcomplicating the solution to this problem. Is it a time complexity thing? The time complexity of this is n which is not ideal - are people using maps/dictionaries because of a better time complexity?