Answer Posted / pavan
Hash Table: is a data structure in which keys are mapped to array positions by a hash function. This table can be searched for an item in O(1) time using a hash function to form an address from the key. The easiest way to conceptualize a hash table is to think of it as an array. When a program stores an element in the array, the elements key is transformed by a hash function that produces array indexes for that array.
Hash Function: is a function which, when applied to the key, produces an integer which can be used as an address in a hash table. The intent is that elements will be relatively randomly and uniformly distributed. In the example above the code for the hash function would look like this (assuming TABLE_SIZE was defined 100):
| Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
What do you mean by double hashing?
What is the difference between arraylist and hashmap?
What is array and string?
Is python good for freshers?
Is hashmap a collection?
What is dynamic array with example?
Which method will arrange the element of an array in alphabetical order?
Differentiate between hashset and hashmap.
Why hashmap is faster than hashtable?
How do you sort a collection in descending order?
When is a binary search algorithm best applied?
What are the types of queues?
How do you sort an array in decreasing order?
Explain how is linked list implemented?
How do you clear a stack?