p>
<ul>
<li><p>Java‚Äôs hashtable does this by default</p></li>
</ul>
</li>
<li><p>When an insertion fails</p></li>
<li><p>Some other threshold</p></li>
</ul>
</li>
<li><p>Cost of rehashing</p>
<ul>
<li><p>Let‚Äôs assume that the hash function computation is constant</p></li>
<li><p>We have to do n inserts, and if each key hashes to the same spot, then it will be a Œò(n2) operation!</p></li>
<li><p>Although it is not likely to ever run that slow</p></li>
</ul>
</li>
</ul>
</li>
<li><p>Removing</p>