In this question, the instructor is talking about when a hashmap works in constant time(when it is already loaded in ram and we just query it) and it takes O(N) time when we insert elements one by one? Can you please explain this concept in detail for me?
When does a Hashmap work in constant time and when does it work in O(N) time?
Basically it means that of element is present in map then it takes constant time… but if we have to insert elements and then find then it works in O(N)…
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.