Posted by: nepalithitho February 5, 2011
Login in to Rate this Post:
0
?
I think he is trying to create a most simple version of a Hash Table, where sum of ascii values of a string is the hash code. And to get the index in the hash table, he needs to mod the sum by the table size:
prankster bro ko solution should be:
return sum%HASH_TABLE_SIZE; // Given that HASH_TABLE_SIZE is a const defined somewhere in the code
prankster bro ko solution should be:
return sum%HASH_TABLE_SIZE; // Given that HASH_TABLE_SIZE is a const defined somewhere in the code