- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

# Brent’s Method in Data Structure

In this section we will see what is Brent’s Method related to open addressed hashing. This method is a heuristic. This attempts to minimize the average time for a successful search in a hash table.

This method was originally applying on double hashing technique, but this can be used on any open addressing techniques like linear and quadratic probing. The age of an element x, is stored in an open addressing hash table, is the minimum value i, such that x is placed at A[x_{i}]

Brent’s Method tries to minimize the total age of all elements. If we insert an element x, then it will follow some steps − We will find smallest value of i, such that A[x_{i}] is empty, this is where standard open-addressing would insert x. Now consider one element y, which is stored at A[x_{i-2}]. This element is stored there because yj = x_{i-2}, for some value of j ≥ 0. We check if the array location A[y_{j+1}] is empty, then we move y to location A[y_{j+1}], and store x at location A[x_{i-2}].

Compared to normal open addressing, this decreases the total age by 1. In general Brent’s Method checks for each 2 ≤ k ≤ i, the array entry A[x_{i-k}] to see, if the element y is stored, there, can be moved to any of A[y_{j+1}], A[y_{j+2}], . . ., A[y_{j+k-1}], to make room for x.

- Related Questions & Answers
- Substitution Method in Data Structure
- Boole’s Inequality in Data Structure
- Yen's k-Shortest Path Algorithm in Data Structure
- Rectangle Data in Data Structure
- Halfedge data structure
- Deaps in Data Structure
- Quadtrees in Data Structure
- Arrays Data Structure in Javascript
- Stack Data Structure in Javascript
- Queue Data Structure in Javascript
- Set Data Structure in Javascript
- Dictionary Data Structure in Javascript
- Tree Data Structure in Javascript
- Graph Data Structure in Javascript
- Finger Searching in Data Structure