
Using HashMap, cuz hashmap's lookup only cost O(1) time complexity
a maths formula to take a searched value and convert it into some integer value - which can then be used to define an index. So typically, no matter how many other values already exist in that map, a single task takes one operation. This is what the O(1) means.