Add to Chrome
✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
Який з варіантів обчислення хеш-функції є правильним?
unsigned int hash(char* s)
{
int i = 0;
unsigned value = 0;
while (s[i] != ‘\0’)
value = (s[i] + 31*value) % 101;
i--;
}
return (value*s);
i++;
return value;
while (s[i] == ‘a’)
value = (s[i] + 31*value) * 101;
float i = 0;
value = (s[i+1] + 31*value) * 101;
return s;
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!