Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

want a cpp simple and easy code for beginersswithout any inbuilt libraries Suppose that NADRA hires you as an IT expert for advancing their ID-System.

want a cpp simple and easy code for beginersswithout any inbuilt libraries 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 login), 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 delction problems, implement a chaining method. Task-3: Implement linked-list-based chaining. Task-4: Implement BST-based chaining. NOTE: Your system mast be able to perform insertiondeletion/scarching in every case (chaining/probing). HINT for NADRA-ID-based hash function: Format: aaasa-ffffff-g Get the first five numbers and get a key from your designed hash function, Simularly, 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 necessary to use this technique, your can design your own waxy to get the key: DATA: Use randomly generated ID-card numbers for insertion and searching. Be careful about the format of the ID card numbers. Compare the linear 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: Besides comparisom, your system will also display a proper menu for searching/deletionitsertion of the usser input ID cand nambers. Randouly generated 1D cand number insertian and searching can only be ased for comparison. So, make it 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

Step: 3

blur-text-image

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Database And Expert Systems Applications 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 Proceedings Part 1 Lncs 13426

Authors: Christine Strauss ,Alfredo Cuzzocrea ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

3031124227, 978-3031124228

More Books

Students also viewed these Databases questions

Question

L A -r- P[N]

Answered: 1 week ago