Which data structures should you use for the address book

Assignment Help Other Subject
Reference no: EM132144410

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.

Reference no: EM132144410

Questions Cloud

What would you need to do to run it just tonight as root : Suppose you wanted to delete the trash of all users just tonight at 11pm using the just created /root/deleteTrash.bash script.
Critiquing application of hrm in a contemporary organisation : you should select an organisation where you currently work or have worked in the past, or an organisation that you would like to work for in the future
Should mommas use global hotels information systems : Consider issues such as business profiles, business processes, system interactivity, EDI, ecommerce, and the characteristics of both information systems.
What is the keyspace of the one-time pad for a ciphertext : Suppose you wish to encrypt the messsge BEYONCE using the one time pad with the key RIHANNA.
Which data structures should you use for the address book : Which data structures should you use for the address book in general to store the class Person? Give reasoning for your answer.
What is the largest moving wheel you could use : Suppose you wish to make a design with 10 lobes, and you have only a large ring with 120 inner teeth.
Write a utility program named filesplitter that splits : Suppose you want to back up a huge file to a CD-R. You can do this by splitting the file into smaller pieces and backup up those pieces separately.
Determine the type of distribution : Draw marbles from a bag which contains 5 red marbles, 6 blue marbles and 4 green marbles with replacement until you get a blue marble.
What is the purpose of mutator methods : What is the purpose of mutator (setter) methods? What is the purpose of (getter) methods)?

Reviews

Write a Review

Other Subject Questions & Answers

  Cross-cultural opportunities and conflicts in canada

Short Paper on Cross-cultural Opportunities and Conflicts in Canada.

  Sociology theory questions

Sociology are very fundamental in nature. Role strain and role constraint speak about the duties and responsibilities of the roles of people in society or in a group. A short theory about Darwin and Moths is also answered.

  A book review on unfaithful angels

This review will help the reader understand the social work profession through different concepts giving the glimpse of why the social work profession might have drifted away from its original purpose of serving the poor.

  Disorder paper: schizophrenia

Schizophrenia does not really have just one single cause. It is a possibility that this disorder could be inherited but not all doctors are sure.

  Individual assignment: two models handout and rubric

Individual Assignment : Two Models Handout and Rubric,    This paper will allow you to understand and evaluate two vastly different organizational models and to effectively communicate their differences.

  Developing strategic intent for toyota

The following report includes the description about the organization, its strategies, industry analysis in which it operates and its position in the industry.

  Gasoline powered passenger vehicles

In this study, we examine how gasoline price volatility and income of the consumers impacts consumer's demand for gasoline.

  An aspect of poverty in canada

Economics thesis undergrad 4th year paper to write. it should be about 22 pages in length, literature review, economic analysis and then data or cost benefit analysis.

  Ngn customer satisfaction qos indicator for 3g services

The paper aims to highlight the global trends in countries and regions where 3G has already been introduced and propose an implementation plan to the telecom operators of developing countries.

  Prepare a power point presentation

Prepare the power point presentation for the case: Santa Fe Independent School District

  Information literacy is important in this environment

Information literacy is critically important in this contemporary environment

  Associative property of multiplication

Write a definition for associative property of multiplication.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd