Question: Any help would be greatly appreciated. Expected output should run in terminal how it is stated in blue. ( In C) In this assignment, you

Any help would be greatly appreciated. Expected output should run in terminalAny help would be greatly appreciated. Expected output should run in terminal how it is stated in blue. ( In C)

In this assignment, you will develop a C program of micro-version of Facebook using Hash Tables and Linked Lists. Specifically, your program will accept from input a sequence of commands of the following forms, one command to a line, such as: P (name) Create a person record of the specified first name. You may assume that no two people have the same first name. F (namel) (name2) Record that the two specified people are friends. U (namel) (name2) Record that the two specified people are no longer friends. L (name) Print out the friends of the specified person. Q (namel) (name2) Check whether the two people are friends. If so, print "Yes"; if not, print "No" X terminate the program. For instance, this is one possible input and output: Output Input P Sa P Liza P Mark P Amy F Liza Amy F Liza Mark F Amy Sam L Amy L Sam U Liza Amy L Amy Q Liza Mark X Liza Sam Amy Sam Yes . Try to make the program as efficient as possible. An efficient algorithm should satisfy the following: The command "L" should take time proportional to the number of friends that the person has. The command "U" should execute in time proportional to the sum of the friends that the two named people have. The commands "P", "F", and "Q" should execute in a constant time. But this is not required. . All these commands should execute in time that is independent of the total number of people in the system. You don't need to write the data into a file. All the entries should be saved in memory. Your program should compile using gcc on a unix/lunix machine. Using a makefile is encouraged but not required. You can also provide a readme file if needed. 1 page

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!