做了一点简单的hash,刚开始用set,总结一下。
hash表通过把关键码值映射到表中一个位置来访问记录,以加快查找的速度。
比如这就是一种方法
Let consist of positiveintegers .The problem is to find the smallest positiveintegerC such that
for all .
C must be a multiple of at least one element of W.
If some
for all ,
then the next largest C that could resolve the conflict is at least
Since all such conflicts must be resolved, it is advantageous to choose the largest candidate from among the conflicts as the nextC to test.