Grow Table
1.Create a new table
2.rehash the whole data into the new table
Table doubling!
Amortization:
string matchint:
we can use hashing make it just using constant time
Karp-Rabin string matching algorithm
本文介绍了表增长的一种实现方式——表加倍,并讨论了其分摊成本。此外,还探讨了如何利用哈希将字符串匹配的时间复杂度降低到常数级别,并简要介绍了Karp-Rabin字符串匹配算法。
Grow Table
1.Create a new table
2.rehash the whole data into the new table
Table doubling!
Amortization:
string matchint:
we can use hashing make it just using constant time
Karp-Rabin string matching algorithm
2495
283
320

被折叠的 条评论
为什么被折叠?