Question
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started