I need help mathmatically proving that a function is Olog(n). I know that 0(n) is linear search. But how would i go about proving a function like this.
-Hash Function-
1 2 3 4 5 6 7 8 9 10 11 12 13 14
unsignedint RSHash(const std::string& str)
{
unsignedint b = 378551;
unsignedint a = 63689;
unsignedint hash = 0;
for(std::size_t i = 0; i < str.length(); i++)
{
hash = hash * a + str[i];
a = a * b;
}
return hash;
}