4 ms·
Maybe I'm missing something, but the pseudocode looks funky. Is he really assuming at most one key per bucket? This code seems like it fails when the number o
by wildwood 18y ago
Maybe I'm missing something, but the pseudocode looks funky. Is he really assuming at most one key per bucket?
This code seems like it fails when the number of keys in the table exceeds the number of buckets. Assuming that 'table.size' returns the number of keys, and not the number of buckets, he'll also be hitting 'index out of bounds' errors.
Of course, I could be wrong. Pseudocode can have a funky syntax. :)