Analyst Integration Question: Download Questions PDF
Tell me how much time it take to retrieve an element if stored in HashMap, Binary tree and a Linked list? how it change if you have millions of records?
![Integration Programmer Interview Answer Integration Programmer Interview Question](https://globalguideline.com/public/images/interview/32.png)
Answer:
In HashMap it takes O(1) time, in binary tree it takes O(logN) where N is number of nodes in tree and in linked list it takes O(n) time where n is number of element in list. Millions of records doesn't affect the performance if data structure are working as expected e.g. HashMap has no or relatively less number of collision or binary tree is balanced. If that's not the case then their performance degrades as number of records grows.
Download Integration Programmer Interview Questions And Answers
PDF
Previous Question | Next Question |
Can you please explain the difference between Overriding and Overloading? | Explain regular expression? |