A very simple function to map strings to integers:
Add up character ASCII values (0-255) to produce integer keys
E.g., “abcd” = 97+98+99+100 = 394
==> h(“abcd”) = 394 % TableSize
Potential problems:
Anagrams will map to the same index
h(“abcd”) == h(“dbac”)
Small strings may not use all of table
Strlen(S) * 255 < TableSize
Time proportional to length of the string