Summary

What is Linked List ?

      Linked List is a linear collection of data elements called as nodes and each nodes are connected    between other nodes by a link using pointers.







Type of Linked List


Operation in Linked List

  • Insertion of a new Node
  • Deletion of a Node

Linked List Vs Array
  1. Array supports random access where linked list doesn’t
  2. Linked list has dynamic memory allocations while array not, therefore we can add any number of elements in linked list
  3. Operations such as insertion and deletion is easier and faster to do in linked list
  4. In array, elements are stored in consecutive memory locations while in linked list elements can be stored anywhere in the memory 
Advantages and Disadvantages of Linked List







What is Hashing

          Hashing is a function that are used to map a given value with a particular key to an array for faster access of elements. A string of characters are transformed into a usually shorter length value or key that represents the original string.

Hash Table

          Hash Table is a table (array) where we store the original string. 
Hash Function


  1. Division
    This is the most common hash function, this function divide the string or identifier by using the modulus operator
  2. Mid-square
    This function square the string or identifier and then using an appropriate number of bits from the middle of the square to obtain the hash key
  3. Folding
    This function partition the string or identifier into several parts, then add the parts together to obtain the hash key.
  4. Digit Extraction
    This function find a predefined digit of the given number which is considered as the hash address.
  5. Rotating Hash
    This function are performed by shifting the digits to get a new hash address

Hashing Table Implementation in Blockchain

  • Cryptocurrency like Bitcoin and Etherum primarily rely on hashing
  • The proof of transaction in Blockchain is expressed by the double SHA-256 hashing algorithm
  • Hashing helps in defining cryptographic signatures that help determine valid transactions


What is Binary Tree
Binary Tree is a rooted tree data structure in which each node has at most two children.

Type of Binary Tree


  1. Perfect Binary Tree
    Binary Tree in which every level of nodes are at the same depth
  2. Complete Binary Tree
    Binary Tree in which every level is completely filled, expect maybe the last, and nodes are as far left as possible. A perfect binary tree is a complete binary tree.
  3. Skewed Binary Tree
    Binary Tree in which each node has at most one child.
  4. Balanced Binary Tree
    Binary Tree in which no leaf is much farther away from the root than any other leaf.
Binary Tree could be implemented in Array or Linked List

Comments