Google的稀疏哈希表如何处理冲突?即当2个元素映射到同一个桶时,它如何决定放置新(碰撞)元素的位置?我正在阅读What is the main implementation idea behind sparse hash table?,但该答案并未涵盖碰撞理念。
答案 0 :(得分:2)
您的问题已在文档here中得到解答,具体为:
2c)如果指定
BaseFont bfTimes = BaseFont.CreateFont(BaseFont.TIMES_ROMAN, BaseFont.CP1252, false); iTextSharp.text.Font times = new iTextSharp.text.Font(bfTimes, 6); PdfPCell Cell = new PdfPCell(new Phrase(DateTime.Now.ToString("dd MMM yyyy"), times)); Cell.HorizontalAlignment = Element.ALIGN_RIGHT; Cell.Border = 0; pageCount.AddCell(Cell); Cell = new PdfPCell(new Phrase(count.ToString() +" / "+ Total.ToString(), times)); Cell.HorizontalAlignment = Element.ALIGN_MIDDLE; Cell.Border = 0; pageCount.AddCell(Cell); Cell = new PdfPCell(new Phrase("Company name " + DateTime.Now.ToString("yyyy"), times)); Cell.HorizontalAlignment = Element.ALIGN_MIDDLE; Cell.Border = 0; pageCount.AddCell(Cell); return pageCount; }
,但指定的值不是foo,请查看。如果失败,请尝试
t.sparsetable[i % 32]
,然后t.sparsetable[(i+1) % 32]
。一般情况下,继续尝试下一个三角形数字。
您可以阅读三角数here。