📜  java hashmap 时间复杂度 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:26.990000             🧑  作者: Mango

代码示例2
On the other hand, a HashMap has an average time complexity of O(1) 
  for put() , contains() and remove() operations. 
  The worst-case time complexity for those operations is O(log n) 
  since Java 8, and O(n) before that. Space-complexity wise, both
  have a complexity of O(n)