Posts

Dynamic Hashing in Data structure| Dynamic Hashing in DBMS

Image
  Dynamic Hashing Handwritten Notes- Click Here Dynamic Hashing allows the hash table to grow or shrink dynamically according to the amount of data. The number of buckets changes dynamically. Bucket overflow is handled by splitting or expanding. It is suitable for storing large amounts of data. Extendible Hashing Extendible Hashing is a dynamic hashing technique. It uses a directory with Global Depth. Each bucket has a Local Depth .(Last bit) When a bucket becomes full, it is split into two buckets. If required, the directory size is doubled. It uses suffix bits (last bits) to identify the buckets. Example Values = 11, 18, 20, 25, 29, 33 Bucket Size = 2 Binary Representation Value Binary Last 1 Bit Last 2 Bits Last 3 Bits 11 1011 1 11 011 18 10010 0 10 010 ...

Tree Traversal

Image
  Tree Traversal Handwritten Notes- Click Here A tree is a non-linear data structure in which elements are arranged in a hierarchical structure . Tree Traversal is the process of visiting each node of a tree exactly once in a particular order. The main types of tree traversal are: Preorder Traversal ( Root → Left → Right ) Inorder Traversal ( Left → Root → Right ) Postorder Traversal ( Left → Right → Root) Preorder Traversal : In Preorder Traversal, the root node is visited first, followed by the left subtree and then the right subtree. Example A / \ B C / \ D E The Preorder Traversal is:  A → B → D → E → C Inorder Traversal: In Inorder Traversal, the left subtree is visited first, followed by the root node and then the right subtree. Example A / \ B C / \ D E The Inorder Traversal is:  D → B → E → A → C Postorder Traversal: In Postorder Traversal, the left subtree is visited first, followed by...

Binary Search Tree

Image
  Binary Search Tree(BST) Handwritten Notes- Click Here A Binary Search Tree (BST) is a type of binary tree in which each node is arranged according to a specific ordering rule. All values in the left subtree are smaller than the value of the root node. All values in the right subtree are greater than the value of the root node. The same rule is followed recursively for every node in the tree. Because of this ordering, searching, insertion, and deletion can be performed efficiently. Insertion:                       Insertion is used to add a new value to the BST. Steps Start from the root. Compare the new value with the current node. If the new value is smaller , move to the left subtree. If the new value is greater , move to the right subtree. Continue until an empty position is reached. Insert the new node at that position. Let us construct a Binary Search Tree by inserting the following values one by one:   ...

Queue ADT

Image
  Queue ADT Handwritten Notes- Click Here A  Queue  is a linear data structure in which elements are inserted at one end and removed from the other end.( Insertion → Rear,  Deletion → Front )                                   ↓ FRONT                                 ↓ REAR A B C D E    A queue follows the FIFO (First In, First Out) principle. This means that the element inserted first is removed first. A  Queue can be implemented using: Array Linked List Basic  Queue  Operations: 1. Enqueue - used to insert  a new element into the queue. 2. Dequeue - used to remove an element from the queue. 3. Peek - used to view the first element without removing it. 4. isEmpty - checks whether the queue contains any elements. 5...