Posts

Showing posts from March, 2020

Hash And Binary

Hash And Binary Hashing Hashing is a technique used for storing and retrieving keys in a rapid manner.In hashing, a string of characters are transformed into a usually shorter length value or key that represents the original string.Hashing is used to index and retrieve items in a database because it is faster to find item using shorter hashed key than to find it using the original value.Hashing can also be defined as a concept of distributing keys in an array called a hash table using a predetermined function called hash function. Hash Table Hash table  is a data structure that implements an associative array abstract data type, a structure that can map keys to values. A hash table uses a hash function to compute an index, also called a hash code, into an array of buckets or slots, from which the desired value can be found. Example: Supposed we want to store 5 string: define, float, exp, char, atan into a hash table with size 26. The hash function we w...

Linked List

Image
Linked List Linked List Definition A linked list is a dynamic data structure where a  node  is made up of two items - the data and a reference (or pointer) which points to the next node. A linked list is a collection of nodes where each node is connected to the next node through a pointer. The first node is called a  head  and if the list is empty then the value of head is NULL.For a real-world analogy of linked list, you can think of conga line, a special kind of dance in which people line up behind each other with hands on shoulders of the person in front. A Simple Linked List Circular Single Linked list In Circular Single Linked List, last node contains a pointer to the first node, We can have a circular singly linked list as well as a circular doubly linked list. There is no storing of NULL values in the list Implementation Insertion A node can be added in three ways: Insertion in an empty list Insertion at the beginning of the li...