Esempio n. 1
0
 def hash_insert(self, x):
     hashKey = self.hash_function(x.key)
     while len(
             self.T
     ) < hashKey + 1:  # TODO: Use Table-insert instead of this (p 464)
         self.T.append(LL.LSingly())
     self.T[hashKey].list_insert(x)
Esempio n. 2
0
 def __init__(self):
     self.T = []
     for i in range(10):
         self.T.append(LL.LSingly())