Which is true about the mapping in a hashmap?

The actual mapping in a hashmap is constant time (O (1)), but the need to handle collisions brings the cost to log n. That is, multiple elements that hash to the same array index must be stored in a secondary data structure (aka bucket), and it is this bucket that determines the worst-case performance.
For More Information Please Refer:

You May Also Like to Read: