Say instead of using a linked list as buckets for a hash table of size $m$, we use another hash table of size $p$ as buckets this time. What would be the average case for this problem?
I looked up perfect hashing and I got a very close algorithm, and it is $O(1)$. Can someone please clarify?