Key value pair is usually seen in Hash Tables - Data Structure

Q.  Key value pair is usually seen in __________.
- Published on 25 Aug 15

a. Hash Tables
b. Heaps
c. Both a and b
d. Skip list

ANSWER: Hash Tables
 

    Discussion

  • Nirja Shah   -Posted on 21 Nov 15
    HashTable works on key value pair. If you provide a key, then it will return the corresponding value. A hash table uses a hash function to compute an index and provide the respective value. Suppose that you storing empID and empName as key, value pair, then if you pass empID, it will give you the empName as result. In general, search time of hashtable is O(1) i.e constant time.

Post your comment / Share knowledge


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)