Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Read carefully and answer the questions that follow: Suppose we want to create a

ID: 3831141 • Letter: R

Question

Read carefully and answer the questions that follow:

Suppose we want to create an address book which contains names, phone numbers, emails, and other personal information. In the question below, give support to your answer based on the typical operations (for example, finding a person by his/her email) you might use. Explain why the algorithm and/or data structure you use gives a good tradeoff between memory use and runtime complexity. The question below could require nested data structures.

Suppose you want to list your friends who have March birthdays in order of date. What algorithm(s) and data structure(s) whould you use to accomplish this. You may assume that you have a birthday field which has a Date class that contains date and month member variables. Declare any other assumptions you make and give reasoning for your answer.

Explanation / Answer

1. Create classes for Date (date,month), Person having name, phonenumber, email, personal information and DOB(date type)

2. Use hash tables to store address book data

Hash index should be designed in a manner such that same hash index can be generated for a record when searched using name/phone/email/ or any other field

Benefits of using hash tables:

1. It uses less memory and is memory is properly organized

2. Search, insert, delete operations are faster (execution time is pretty less best case O(1) and worst case O(n))

To get records of friends with birthday in March in sorted order: create hash index using dob and then sort hash indexes and show the data.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote