Hashing Example
Keys: 4-digit numbers. Values: names.
Let h(d1d2d3d4) = (d1 + d2 + d3 + d4) mod 10. E.g., h(1978) = 5.
Data: (1978, VAX-11/780), (1982, IBM-PC), (1984, Macintosh)
0: 1982 IBM-PC
1:
2: 1984 Macintosh
3:
4:
5: 1978 VAX-11/780
6:
7:
8:
9:
Previous slide
Next slide
Back to first slide
View graphic version