Hashing is fastest way to store & retrieve data - Data Structure

Q.  Which of the following is the fastest ways to store and retrieve data?
- Published on 26 Aug 15

a. Sorting
b. Hashing
c. Indexing
d. both A and C

ANSWER: Hashing
 

    Discussion

  • Nirja Shah   -Posted on 21 Nov 15
    There are many techniques to store and retrieve data and the performance of these techniques is depending upon the type and structure of data. According to given question hashing is the fastest ways to store and retrieve data.
    Almost all searching technique, the search time is dependent on the number of items and many key comparisons are involved. Hashing is a technique where search time is independent of the number of items. This technique uses hash function to generate an address from a key. We can write hash function as follows
    h(k)=a;
    Where h is hash function, k is the key, a is the hash value of the key.

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.)