Advertisement
Guest User

Untitled

a guest
May 30th, 2015
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.18 KB | None | 0 0
  1. unsigned hash(string str)
  2. {
  3.     unsigned hash = 0;
  4.     for(int i = 0; i < str.size(); i++)
  5.         hash = (hash * 1664525) + (unsigned char)(str[i]) + 1013904223;
  6.     return hash;
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement