keyValue is a function that returns value which is assigned for letter from letter table.
Letter Table
---------------
Letter Value
f -8
m -4
s -9
t -7
w -6
y 3
For example : If we want to hash "saturday" hash function will return
keyValue( 's') + keyValue( 'y' ) + 8
which is equal to 2.
Anyway, I did this part.But i use static letter table.The part that i couldn't solve is to create letter table dynamically.
This algorithm should work not only for week days , but also work for any other word list just like C reserve words( keywords ).