title: Set time and speed complexity
body: <p>I am brushing up algorithms and data structures and have a few questions as well as statements I would like you to check.</p>
  
  <p><strong>ArrayList</strong> - O(1) (size, get, set, ...), O(n) - add operation.<br>
  <strong>LinkedList</strong> -  all operation O(1) (including add() ), except for retrieving n-th element which is O(n). I assume size() operation runs in O(1) as well, right?</p>
  
  <p><strong>TreeSet</strong> - all operations O(lg(N)). size() operation takes O(lg(n)), right?</p>
  
  <p><strong>HashSet</strong> - all operations O(1) if proper hash function is applied.<br>
  <strong>HashMap</strong> - all operations O(1), anologous to HashSet.</p>
  
  <p>Any further explanations are highly welcome. Thank you in advance.</p>