Monday, March 16, 2020

Hashing Table & Binary Tree

Hashing Table

Hashing Table is a data structure which stores data in an associative manner. In hashing table the data are stored in an array format, where each value has it's own unique index value. Hashing is a technique to convert a range of key values into a range of indexes of an array. An example of hashing in real life is, each student in a university is given their own unique student ID that contain their own information.

The code to get the hash index :













Hashing in today blockchain are use to converts an input of letters and numbers into an encrypted output of fixed length and is essential to blockchain management in cryptocurrency.

Binary Tree

Binary tree is a data structure where each node can only have at most 2 children node that can be referred as left child and right child. Binary tree have important terms like, Root - the node at the top of the tree, Path - refers to the sequence of nodes along the edges of a tree, Parent - any node that have child node, Leaf node which does not have any child node, and more.

The initial code for creating the binary tree : 







No comments:

Post a Comment