unsigned in hash(char *p)
{
unsigned int h = 0;
for (; *p; p++)
h = MULT *h + *p;
return h % NHASH;
}
字符串哈希到整数函数,算法(2)
内容版权声明:除非注明,否则皆为本站原创文章。
转载注明出处:http://www.heiqu.com/e06571fea05b42b20d344f38be91b21a.html
unsigned in hash(char *p)
{
unsigned int h = 0;
for (; *p; p++)
h = MULT *h + *p;
return h % NHASH;
}
内容版权声明:除非注明,否则皆为本站原创文章。
转载注明出处:http://www.heiqu.com/e06571fea05b42b20d344f38be91b21a.html