title: HashMap put() api time complexity
body: <p>So I was reading about Java collections api's, and was wondering about <code>HashMap put()</code> api, as per doc's it says its an constant time operations, but what confuses me is whether rehashing was taken into considerations as part of time complexity calculation or not.</p>
  
  <p><code>ArrayList</code> <code>add()</code> api on the other side clearly states its amortised o(n) i.e to add n element it will take n amount of time, why don't it applies to <code>HashMap</code> put then? though <code>HashMap</code> dynamically create bigger buckets upon reaching load factor, and re applies hash to existing entires to determine new bucket location.</p>
  
  <p>any help on explaining above will be highly appreciated, let me know if this questions needed to moved to some other section, before down voting it. </p>
  
  <p>Thanks.</p>