You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During using the lib HashTable, the counting is unexpected when the item number is larger than the table size.
Steps/Code/Corpus to Reproduce
from bounter import HashTable
Ht = HashTable(buckets=4)
Loop = 8
ItemNum=8
print ("Loop = ", Loop)
for i in range (0, Loop):
for s in range (0, ItemNum):
Ht.increment(str (s))
for s in range (0, 8):
print ("Ht[%d] = %d" %(s, Ht[str (s)]))
Description
During using the lib HashTable, the counting is unexpected when the item number is larger than the table size.
Steps/Code/Corpus to Reproduce
Expected Results
Ht[0] = 8
Ht[1] = 8
Ht[2] = 8
Ht[3] = 8
Ht[4] = 0
Ht[5] = 0
Ht[6] = 0
Ht[7] = 0
Actual Results
Ht[0] = 0
Ht[1] = 0
Ht[2] = 0
Ht[3] = 0
Ht[4] = 0
Ht[5] = 0
Ht[6] = 0
Ht[7] = 1
Versions
the main branch
The text was updated successfully, but these errors were encountered: