Hashing & Binary tree

Hashing is a technique to convert a range of key values into a range of array indexes. Hash table is a data structure that stores data associatively. In a hash table, data is stored in an array format, where each data value has its own unique index value. If we recognize the index of the desired data, access of data becomes efficient. Thus, the insertion and search operations in the data structure would be fast irrespective of the data size. Hash table uses an array as a storage medium and uses hash technique to generate an index where an element is to be inserted or located from.

A binary tree is a tree data structure in which each node has at most two children, which are usually referred as the left child and the right child. Its mainly implemented using links. Unlike arrays, linked lists, stack and queues, which are also linear data structures, a binary tree is a hierarchical data structure. A tree is represented by a pointer to the top node in the tree. if the tree is empty, then value of root is NULL. A binary tree node contains data, and a pointer to both left child and right child.
One of the reasons to use binary tree or tree in general is to process a form of hierarchy. Quite useful in file structures where each files is located in a particular directory and theres a specific hierarchy associated with files and directories.

Hashing is fundamental in the creation of blockchain. If someone wants to comprehend blockchain, they must first understand hashing. The important role of cryptography in blockchain networks continues to grow. One of them is hashing, which is the process of calculating a concrete and unique data. Maybe you are familiar with the unique code found on blockchain and that is one example of hash. So in conclusion hashing table has been used in current block chain technology.


Comments