Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Homework Help/Study Tips Expert

Question :

Suppose we want to create an address book which contains names, phone numbers, emails, and other personal information.

In the questions below, give support to your answers 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.

Some of the questions below could require nested data structures (for example, a Map which has values that are Sets).

a) Which data structures should you use for the address book in general to store the class Person? Give reasoning for your answer.

b) Suppose you have friends who live in various different cities. What data structure could be useful to find these friends efficiently. You can suppose that each friend has a city field associated with them. Give reasoning to your answer. Think about search engines for this question.

c) Suppose you want to check that there are no people with the same email address. Which algorithm(s) and data structure(s) might you use to do this? Give reasoning for your answer.

d) Suppose in you know which of the people in you address book are friends which each other. Now suppose you take yourself out of the graph. Which algorithm(s) and data structure(s) would help you determine the number of unrelated groups of friends you have? Give reasoning for your answer.

e) 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.

Homework Help/Study Tips, Others

  • Category:- Homework Help/Study Tips
  • Reference No.:- M93131875

Have any Question?


Related Questions in Homework Help/Study Tips

Assignmentdevelopmental psychology seeks to address various

Assignment Developmental psychology seeks to address various aspects of human development, including physical, cognitive, social, moral, and personality development. Write a 1,050- to 1,400-word paper discussing the infl ...

Assignmentestablishing an effective information technology

Assignment Establishing an effective Information Technology Security Policy Framework is critical in the development of a comprehensive security program. Additionally, there are many security frameworks that organization ...

Do electrical signals that represent objects at different

Do electrical signals that represent objects at different places in a scene go to different places in the brain? Explain.

Question marketing to organizations is significantly

Question: Marketing to organizations is significantly different from marketing to the consumer. This discussion will focus on issues such as derived demand. Topic 1: Why is the concept of derived demand so important for ...

Questionsanswers should be at least 100-175 words and

Questions Answers should be at least 100-175 words and reflect critical thought. Whenever possible, please try to relate the course content to real-world applications from your work experience. Be sure to cite all source ...

Q1 written assignment part one take a simple survey of 10

Q#1: Written Assignment :Part One: Take a simple survey of 10 people. Ask them if they are aware of the gender wage gap. If they answer "no", then inform them of the wage difference between men and women on the basis of ...

Question contracts youve entered intofind any contract you

Question: Contracts You've Entered Into Find any contract you have signed. Read through it. 1. State the contract and then summarize some of the provisions that surprises and/or concerns you. What are your thoughts on th ...

Question describe ungerleider and mishkins experiment how

Question: "Describe Ungerleider and Mishkin's experiment. How did they use the procedure of brain ablation to demonstrate what and where steams in the cortex?" The response must be typed, single spaced, must be in times ...

The federal minimum wage is 725 per hour thats 13920 a year

The Federal minimum wage is $7.25 per hour (that's $13,920 a year without taxes). In California, the minimum wage is $11.00 ( $21,120 annually without taxes). According to the U.S. Census, a family of four requires $25,1 ...

Question in topic 5 you submitted a treatment plan for your

Question: In Topic 5, you submitted a treatment plan for your client Eliza. Since the initial treatment plan, several changes have taken place within Eliza's case. Since the mandatory assessment two weeks ago, you have d ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As