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

  What is the big-oh of the method line detect

What is the Big-Oh of the method line Detect? Trace through the binary search algorithm in find In Sorted List given the following input.

  What is the throughput

Measurements of the slotted ALOHA channel with an infinite number of users show that 10 percent of the slots are idle.

  Write function called describe-city that accept name of city

Write a function called describe_city () that accepts name of a city and its country. Function should print a simple sentence, such as Reykjavik is in Iceland.

  Describe three most critical controls that would recommend

A company has a centralized accounting system. Name and describe the three most critical controls that you would recommend.

  What was the total of all costs expensed

What was the total of all costs expensed on the operating income statements across both years under absorption costing and under variable costing?

  Write a program which will give the user the menu of options

SEFP - Computing Programming Assignment - write a program which will give the user the menu of options - Enter a word Invite the user to enter a word

  Address symbols with their decimal equivalent value

During the first pass, the assembler generates a table that correlates all user-defined address symbols with their decimal equivalent value.

  How might a systems analyst manage such a system project

How might a systems analyst manage such a system project? Who would the systems analyst need to interview to get the system requirements? How would a database analyst help in structuring the database requirements?

  Determining the missing side of triangle

Write down a program which will figure out the missing side of the right triangle utilizing the Pythagorean Theorem. Suppose that the user entries will make a triangle.

  Write a main function to test your class with three hot dog

Write a main function to test your class with at least three hot dog stands that each sell a variety of hot dogs.

  Provide an example of a class of markov networks

Provide an example of a class of Markov networks Hn over n nodes for arbitrarily large n (not necessarily for every n), where the size of the largest clique.

  Assume that veclist is a vector container

Suppose that vecList is a vector container and vecList = {12, 16, 8, 23, 40, 6, 18, 9, 75} Show vecList after the following statement executes.

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