Read carefully and answer the questions that follow: Suppose we want to create a
ID: 3830531 • 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
Graph is used to connect gropu of vertices in particular order.We can use graph for this. The people represent the vertices for the graph.for example When two persons are friends, there is a link between them. So when we take ourself out of the graph, the compnent of the graph which contained us gets broken down into several smaller components. The number of new components formed gives the number of unrelated group of friends.Single graph can devided into several smaller compenents and each component can represent one different graph.each graph contains two aor more vertices.The line between two vertices are called edges.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.