SyntaxFix
Write A Post
Hire A Developer
Questions
This will avoid any collision and it will be fast until we use the shifting in calculations.
int k = key.length(); int sum = 0; for(int i = 0 ; i < k-1 ; i++){ sum += key.charAt(i)<<(5*i); }