user496949
user496949

Reputation: 86055

question regarding hash

hash access time is best time O(1) and worst case O(n). I am wondering what's the average case?

Upvotes: 0

Views: 51

Answers (2)

bmenrigh
bmenrigh

Reputation: 81

For a hash that isn't nearing full the average case is roughly O(1). The details depend a bit on how collisions are resolved and how full the hash is. Usually efficiency starts really decreasing around 80% capacity.

Upvotes: 2

Related Questions