Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

how can i find implement the int FbFriendRecs 1 ( Fb fb , char * name , struct recommendation recs [ ] ) function such

how can i find implement the int FbFriendRecs1(Fb fb, char *name, struct recommendation recs[]) function such that it takes the name of a person and finds friend recommendations for them. The function should store the recommendations for them in the given recs array and return the number of recommendations stored in the array.
The function should only recommend people who are friends of friends of the person. In other words, it should only recommend people who share at least one mutual friend with the person. Obviously, it should not recommend someone who is already the person's friend.
Each recommendation consists of the name of the person being recommended and the number of mutual friends they share with the given person.
The recommendations should be sorted in descending order on the number of mutual friends shared, since someone with more mutual friends is more likely to be known by the person, and is therefore more likely to be added as a friend. If two people share the same number of mutual friends, they may be sorted in any order. please do not use functions like qsort. note: I already have a mutual friends function that returning the list of mutual friends.
image text in transcribed

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_2

Step: 3

blur-text-image_3

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

Probabilistic Databases

Authors: Dan Suciu, Dan Olteanu, Christopher Re, Christoph Koch

1st Edition

3031007514, 978-3031007514

More Books

Students also viewed these Databases questions

Question

What does XBRL stand for?

Answered: 1 week ago

Question

What is the purpose of the Salary Structure Table?

Answered: 1 week ago

Question

What is the scope and use of a Job Family Table?

Answered: 1 week ago