Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need a complete code in cpp as it is my university project . and its related to efficient hashing Suppose that NADRA hires you

I need a complete code in cpp as it is my university project . and its related to efficient hashing
image text in transcribed
Suppose that NADRA hires you as an IT expert for advancing their ID-System. Your goal is to design a system that supports fast searching insertion/deletion. Array and Linked-list-based implementation led you to O(n) time complexity for searing/insertion'deletion in the worst case. AVL trees led to log(n), but balancing and high depth are the major concerns in this scenario, So, plan something else. Think before reading the solution. Hashing can be a solution, but collision is a problem that you have to deal with for the best performance. Task 1: Design a hash function that should perform best (nearly best, in terms of the number of collisions). Insert data into a hash table using the designed hash function. Task 2: To avoid collisions, implement the linear probing technique. Now, note the problem with deletion. To avoid deletion problems, implement a chaining method. Task-3: Implement linked-list-based chaining. Task-4: lmplement BST-based chaining. NOTE: Your system mass be able to perform insertiondelenioninarding in every case (chaining/probing). HINT for NADRA-1D-based hash function: Format: aaaan-fffffif-g Get the first five numbers and get a key from yoor designed hash function. Similarly, get the next seven numbers and get a key from your designed hash function. Utilize the answers (keys) of both hash functions and apply another function/formula to get a single key. NOTE: It is not mecessary to use this technigne, your can design your own way to get the hey. DATA: Use randomly generated ID-card numbers for insertion and searching. Be carcful about the format of the ID card numbers. Compare the lincar probing, linked-list chaining, and BST chaining. State the best method in terms of searching. State the reasons as well. For comparison, store 1000 randomly generated ID card numbers and search 100 randomly generated ID card numbers. You have to report the total and average number of collisions for the insertion of 1000 data elements. You are also required to report the average and total number of comparisons for searching 100 data elements. Note: Besider conporison, your system will also display a proper menu for seanching deletion insertion of the user input D cand numbers. Randomly generated ID cand number insertion and searching can only be used for comparison. So, make at clear

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

LO 2-2 What are the Ways to analyze different kinds of audiences.

Answered: 1 week ago