Home > Back-end >  Questions about 1.7 Hashmap
Questions about 1.7 Hashmap

Time:11-19

Question 1:
When using array + singly linked list, insert head, add capacity list is also a head (concurrent infinite loop),
If add capacity for tail plug whether can solve the problem of 1.7 Hashmap infinite loop?

Question 2:
In addition, if you use an array + arrays, hashes conflict also exist in the array, the array can use dichotomy, ideal condition complexity to O (logN), but didn't use this, should be an array of larger capacity complexity?

CodePudding user response:

Question 1: you're right, 1.8 to plug the end of the
Question 2: can't use arrays +, so get a key value is very slow
  • Related