InterviewSolution
Saved Bookmarks
| 1. |
What is the time complexity of insert function in a hash table using list head?(a) O(1)(b) O(n)(c) O(log n)(d) O(n log n)The above asked question is from Hash Tables topic in division Hash Tables of Data Structures & Algorithms IThe question was posed to me during an interview for a job. |
|
Answer» CORRECT answer is (a) O(1) The best I can explain: TIME complexity of insert function in a HASH table is O(1). Condition is that the number of collisions should be LOW. |
|