- This picture shows the same code, but the speed change from list to hashmap
Suppose hashmap is dictionary
L and List,
then item in L lookup speed is O(n)
item in hashmap lookup speed is O(1)
and in hashmap.keys() in hashmap.values() alone will be faster! ! !