TheEWL TheEWL - 1 month ago 17
C++ Question

Hash Table ( Data Structure )

Use the following data when building tables.

32, 64, 8, 23, 60, 47, 62, 59, 15, 29

Ans:

32-2
64-4
8-8
23-8
60-0
47-2
62-2
59-14
15-0
29-14


I understand the answers up to 23 because I can figure out how the answer is 8. My question is, how is 23%10 = 8? This also goes for the answers of 47, 59, and 29.

Answer
  • If it is even, calculate % 10
  • If it is odd, calculate % 15

This is the pattern that you should follow. Next time clarify and explain clearly to get better responses.