File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -283,6 +283,9 @@ public class HashTable<K,V> {
283283```
284284
285285- 哈希表具体功能实现
286+
287+
288+
286289``` java
287290public void add(K key,V value){
288291 TreeMap<K ,V > map= hashtable[hash(key)];
@@ -321,11 +324,19 @@ public V get(K key){
321324}
322325```
323326
327+
328+
324329- 哈希表链表法时间复杂度分析
325330
331+
326332<div align =" center " ><img src =" https://gitee.com/duhouan/ImagePro/raw/master/java-notes/dataStructure/hash//13_5.png " width =" 600 " /></div >
327333
334+
335+
328336## 哈希表的动态空间处理
337+
338+
339+
329340<div align =" center " ><img src =" https://gitee.com/duhouan/ImagePro/raw/master/java-notes/dataStructure/hash//13_6.png " width =" 600 " /></div >
330341
331342
@@ -422,12 +433,16 @@ public class HashTable2<K,V> {
422433}
423434```
424435
436+
437+
425438- 时间复杂度分析:
426439
427440平均时间复杂度:O(1)
428441
429442实际上每个操作的时间复杂度是:O( log(lowerTol) ) ~ O( log(upperTol) ), 而 lowerTol 和 upperTol 都是常数。
430443
444+
445+
431446## 优化哈希表
432447
433448``` java
You can’t perform that action at this time.
0 commit comments