Code Skiller logoCB Logo
Logo LearnLearnLogo PracticePracticeLogo HireHireLogo IDEIDE

Different Components of Hashing

User image

Published by

sanya sanya

Published at: 6th Aug, 2023
0.885 mins read

Process of hashing mainly has four key components:

  1. Hash Table: Hash table is a data structure that maps keys to values using hash functions. Hash holds the data in an array in an associated fashion, giving each data value a distinct index. It stores an array of pointers which point to node*.

  2. Hash Functions: Hash functions are special functions that convert a received input key to an index of array called hash table. This index is known as hash code or hash value.

  3. Collisions: Collision in hashing occurs when two different inputs (or keys) produce the same hash code or hash value, i.e., when hash function generates the same index for two different keys. Collision occurs as there is a problem in placing two or more keys at the same index.

  4. Collision Resolution Techniques: There are few techniques or methods to resolve collision caused due to generation of same hash code for different keys. There are mainly two ways of handling collision: Separate Chaining (Open Hashing) and Open Addressing (Closed Hashing).

Library

WEB DEVELOPMENT

FAANG QUESTIONS