Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The question below describes a complex computing problem. Propose *TWO* different, reasonable solutions to how you would store the data described in this problem. Analyze

The question below describes a complex computing problem. Propose *TWO* different, reasonable solutions to how you would store the data described in this problem. Analyze each solution by discussing the operations that will need to be performed on the data, how often you think those operations will need to be performed, and what the time complexity of those operations would be. Finish with a discussion of which solution you prefer and why. Consider time complexity and, if relevant, other factors in this decision.

You are a busy person who meets lots of different people. You want to keep track of which of the people who you know also know each other. You want to be able to type in lines that contain groups of people who all know each other. Then you want the program to print one line for each person, listing first their name and then the names of all the other people they know. Both the ordering of the lines and the ordering of other people on each line should be alphabetical.

Example Input:

Alice Bob

Bob Cathy Debra

Alice Debra Elizabeth

Example Output:

Alice: Bob Debra Elizabeth

Bob: Alice Cathy Debra

Cathy: Bob Debra

Debra: Alice Bob Cathy Elizabeth

Elizabeth: Alice Debra

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions

Question

2. What are their specific roles?

Answered: 1 week ago