How O(1) time for average case

how O(1) time is there in average case and O(n) in average case

In hashmap you can directly access an element. There is no need to iterate through and search for it. This is why average case to insert, delete or to find is O(1). Complexity of rehashing is O(n) as all the elements in the hashtable of size n is rearranged.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.