Jamku

Kamis, 12 Maret 2020

Hashing & Binary tree GSLC 2 Data Structures

Hashing is a process that use the hash function. Before that, do you know what is a hash function? Hash function is a function that maps every data of arbitrary size to fixed size values. The values that returned by a hash function is called hash function or simply hashes. The values that used to index a fixed sized table or hash table are called hash values.

Hash functions & their hash tables are used for access datas and the data storage space is fractionally small. They access datas in nearly constant time per retrieval. Hashing is a computationally & efficient form of data storage which avoids the non-linear access of the ordered and unordered list. Hash functions related to (& often confused with) checksums, ciphers, error-correcting codes, randomization codes, fingerprints, check digits, & lossy compressions.

Hash Function usage:

  • Calculating a fixed-size bit string value from a file.
  • Allocate memory
  • Access datas


Overview

A hash functions perform three functions:

  1. Convert variable length into fixed length values
  2. Scramble the bits of the key so that the resulting values are uniformly distributed over the key space
  3. Map the key values into one less than or equal to the table size

Good hash function characteristics

A good hash function must minimizing collisions & computing the datas quickly. The poorly designed hash function will perform slowly & it causes the collision.

Implementation in a Blockchain

Hashing is implemented in a blockchain by chaining the hash tables that have a hash function in them. The hash tables consist of more than one keys and more hashing processes. The hash table hashing will be used in the current technology.

Source:

  • Wikipedia
  • etc.


Tidak ada komentar:

Posting Komentar