Guest User

Untitled

a guest
Apr 26th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.18 KB | None | 0 0
  1. int hashFunc (String s , int tableSize) {
  2.     int hashValue = 0;
  3.     for (int i = 0; i < s.length( ); i++) {
  4.         hashValue += 7 * (int)s.charAt(i);
  5.     }
  6.     return hashValue % tableSize;
  7. }
Add Comment
Please, Sign In to add comment