Can someone explain me why we haven't collisions in dictionary in Python if dictionary is a hash-table? I mean, in hash-table hash of two distinct numbers can be the same h(k1) = h(k2), k1 != k2 and that's why we can't count x in array using hash-tables because of not only x can be in h(x) and we will count another numbers with the same hash with x. But we haven't this problem in dictionaries in Python. If we want to count x in array using hash-tables, it will always be correct answer, despite of dictionaries are hash-tables. WHY?
Asked
Active
Viewed 18 times
0
jjjjake
- 15
- 4