What is a hash table?

Category: QuestionsWhat is a hash table?
Editor">Editor Staff asked 5 months ago

What is a hash table?
 
(a) A structure that maps values to keys
 
(b) A structure that maps keys to values
 
(c) A structure used for storage
 
(d) A structure used to implement stack and queue
 
My query is from Hash Tables topic in chapter Hash Tables of Data Structures & Algorithms I
 
This question was addressed to me during a job interview.

1 Answers
Editor">Editor Staff answered 5 months ago

Correct option is (b) A structure that maps keys to values
 
The best explanation: A hash table is used to implement associative arrays which has a key-value pair, so the has table maps keys to values.


Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17

Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17

Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17

Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17
Articles: 40702