Which data structures should you use for the address book

Assignment Help Computer Engineering
Reference no: EM132118897

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 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: EM132118897

Questions Cloud

Explore several aspects of the http protocol : Wait a bit more than one minute (we'll see why shortly), and then begin Wireshark packet capture.
How to read a html file using python : How to read a html file using python, then extract id and links in that file.
How knowledge management systems could be used : Consider your degree program (Business Study with Accounting Concentration) or your selected industry (Restaurant Business).
How would you write a piece of code that throws : How would you write a piece of code that throws a RuntimeException with the message "An incorrect parameter was given"?
Which data structures should you use for the address book : Suppose we want to create an address book which contains names, phone numbers, emails, and other personal information.
Prove that finding an acceptable arrangement : "Marge may not point her arms up while Ned, Apu, and Smithers point their arms down." Prove that finding an acceptable arrangement of arm positions is NP-hard.
Compute the greatest common divisor of two given numbers : Based on these observations, implement a function to compute the greatest common divisor of two given numbers >= 1.
What information do you need to carry out the proposal : You're called in to consult for a company that's issuing about 100 new wireless mobile devices to selected employees.
What is the recurrence for the running time : We're given an array of n numbers, A[1 · · · n] and want to add up the n numbers. What is the recurrence for the running time? Solve it.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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