Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int elfHash(int x) {
- int h = 0;
- for(int i = 0; i < 32; ++i) {
- if(x % 2)
- h = h * 33 + 1511;
- else
- h = h * 31 + 1699;
- x /= 2;
- }
- return h;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement