I'm having trouble understanding what I'm supposed to do in this question
"""
You are given the size N of a hash table.
Your task is to find two strings that map to the same location in the hash table based on Python's hash function.
In other words, you need to find strings x and y such that hash(x) % N == hash(y) % N.
You can assume that N is at most 100.
Your solution should work efficiently in these cases.
Implement in the file samehash.py a function find that returns the desired strings as a pair.
Note that the behavior of the hash function changes each time the Python interpreter is started. Therefore, the function find should give a different solution each time it is run
"""
def find(N):
return 0
if __name__ == "__main__":
print(find(42)) # e.g. ('abc', 'aybabtu')
I though maybe it was the ascii values or something but that wasn't the case. How are abc and aybabtu related in any way??
According to the question they have the same location in this arbitrary hash table, but why?? To me it looks like these are randomly generated strings and there's no way to verify if that output is correct or not, because the condition isn't even satisfied