
- Data Structures & Algorithms
- DSA - Home
- DSA - Overview
- DSA - Environment Setup
- Algorithm
- DSA - Algorithms Basics
- DSA - Asymptotic Analysis
- DSA - Greedy Algorithms
- DSA - Divide and Conquer
- DSA - Dynamic Programming
- Data Structures
- DSA - Data Structure Basics
- DSA - Array Data Structure
- Stack & Queue
- DSA - Stack
- DSA - Expression Parsing
- DSA - Queue
- Searching Techniques
- DSA - Linear Search
- DSA - Binary Search
- DSA - Interpolation Search
- DSA - Hash Table
- Sorting Techniques
- DSA - Sorting Algorithms
- DSA - Bubble Sort
- DSA - Insertion Sort
- DSA - Selection Sort
- DSA - Merge Sort
- DSA - Shell Sort
- DSA - Quick Sort
- Graph Data Structure
- DSA - Graph Data Structure
- DSA - Depth First Traversal
- DSA - Breadth First Traversal
- Tree Data Structure
- DSA - Tree Data Structure
- DSA - Tree Traversal
- DSA - Binary Search Tree
- DSA - AVL Tree
- DSA - Spanning Tree
- DSA - Heap
- DSA Useful Resources
- DSA - Questions and Answers
- DSA - Quick Guide
- DSA - Useful Resources
- DSA - Discussion
LCFS Hashing in Data Structure
In this section we will see what is LCFS Hashing. This is one of the open-addressing strategy, that changes the collision resolution strategy. If we check the algorithms for the hashing in open address scheme, we can find that if two elements collide, then whose priority is higher, will be inserted into the table, and subsequent element must move on. So we can tell that the hashing in open addressing scheme is FCFS criteria.
With the LCFS (Last Come First Serve) scheme. The task is performed exactly in opposite way. When we insert one element, that will be placed at position x0. If the place is already occupied by element y, because yj = x0, then we place y at location yj+1, possibly displacing some element z and so on.
According to Poblete and Munro, the expected search time after inserting n elements in an empty table can be bounded by the following formula.
$$E[W]=1+\Gamma^{-1}(\alpha n)\lgroup1+\frac{ln\:ln\:\frac{1}{1+\alpha}}{ln\:\Gamma^{-1}(\alpha n)}+O(\frac{1}{ln^{2}\:\Gamma^{2}(\alpha n)})\rgroup$$
Here Γ is the Gamma function, and
$$\Gamma^{-1}(\alpha n)=\frac{ln\:n}{ln\:ln\:n}\lgroup1+\frac{ln\:ln\:ln\:n}{ln\:ln\:n}+O(\frac{1}{ln\:ln\:n})\rgroup$$
- Related Articles
- Universal Hashing in Data Structure
- Double Hashing in Data Structure
- Asymmetric Hashing in Data Structure
- Hashing by Division in Data Structure
- Hashing by Multiplication in Data Structure
- Hashing with Chaining in Data Structure
- Robin-Hood Hashing in Data Structure
- Hashing with Open Addressing in Data Structure
- Rectangle Data in Data Structure
- Deaps in Data Structure
- Quadtrees in Data Structure
- Halfedge data structure
- Boole’s Inequality in Data Structure
- Bayes’ Rule in Data Structure
- Dictionary Operations in Data Structure
