Author: Stan Eisenstat
Subject: Re: [Cs223] Testing Hash Table Chaining
Date: Tuesday, 14 Apr 2020, 19:33:37
> Message Posted By: Unknown ... > What are your recommendations for testing chaining? > My current plan would be to call my insert function with two keys that map > to the same index in my hash table. What would two such values be, given > that I am using your hash function from hashFunction.c? If you insert more than M triples into a hash table of size M, you will have to insert more than one in some bucket (a result known as the pigeonhole principle). If you choose a small initial M (e.g., M = 2), you will not have to insert very many triples. Other possibilities include: * Every time that you insert a triple, search for it. * Save a copy of each triple in an array (order is not important) and periodically search for every item in the array. --Stan-PREV INDEX NEXT