in hash map, is insertion and searching complexity O(1) or equal to complexity of hash function being used?
Hash map complexity issue
@Rj.25
There are 2 complexities
First is hash function but since we work with integer keys and arithmetic operations are performed hash function is assumed to work in 0(1)
Second is insertion deletion, we assume that distribution of elements in hashmap is uniform and clashes are less so it works in 0(1) however in reality while the individual operations can range from 1 to N complexity, the average of these complexities turns out to be 0(1)
If your doubt is resolved please close it.