Question: Have an array of 1 0 elements, indexed 0 - 9 . Choose 1 5 different names. Find ASCII value of first and last letters.

Have an array of 10 elements, indexed 0-9. Choose 15 different names. Find ASCII value of first and last letters. Add
digits of ASCII values, find remainder of the number by 10. Then link to appropriate item in the array.
Hash (name)= MOD (ASCII value of first letter + ASCII value of last letter)
Example: Hash Storm
ASCII value of S is 83
ASCII value of lower case m is 109
Add all digits: 8+3+1+0+9=21
MoD (21,10)=1(Remainder of 21 by 10.)
0
1
2
3
4
5

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!