Introduction to Hashmaps
Published by
sanya sanya
What is hashing?
Hashing is defined as the process in which data, regardless of its size is taken, and converted into a fixed-size value or key. This conversion is done using hashing function.
Hashing is often done to quickly store and retrieve data. https://images.codingblocks.com/dsa/hashing%20-%201.png? ![ref1]
Why is hashing done?
When one has a large collection of items, storing and accessing elements in a data structure such as arrays is not efficient. Although, storing element in array takes O(1) time, searching an element takes O(log n) time.
Therefore, hashing was needed as it takes constant time for storing and searching of data. Hashing was introduced for efficient storing and accessing of data.
Along with this, hashing also facilitates with data security and password storage.
Library
WEB DEVELOPMENT
FAANG QUESTIONS